On Mon, 22 Jun 2026 15:53:18 GMT, Paul Sandoz <[email protected]> wrote:
>> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Review comments resolution > > src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Float16Vector.java > line 3750: > >> 3748: a[i] = canonicalNaNBits; >> 3749: } >> 3750: } > > This is too complicated, we don't need to optimize and avoid creating > `Float16` instances (we are anyway already creating an intermediate array). > Simplicity wins here, esp. since these methods will not be used in performant > situations. > > I originally proposed explicit conversion, but I think I would prefer to an > internal `toFloat16Array` method and then we can express as: > > > return Objects.hash(species(), Arrays.hashCode(toFloat16Array())) > > > This offers two advantages: > 1. The code shape closely resembles that which it will eventually be; and > 2. We can reuse `toFloat16Array()` for `toString()` Thanks, I have updated the pull request. Please verify if this looks fine now. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/31587#discussion_r3457373722
