On Mon, 11 Jul 2022 18:56:36 GMT, John Hendrikx <[email protected]> wrote:
>> @hjohn: yes, but at a price: Object.hash(Object ...) incurs overhead by >> creating a temporary Object[] + boxing of a Boolean. > > Ah, I didn't realize you checked how this is optimized by the JIT. In order to reduce collisions, the hash of each component is typically added to `h * 31` even when that hash is 0, whereas you skip the `h = 31 * h` in the case of null. It might not be a problem in practice, since value and origin are unlikely to collide, being of different types, but you might want to look at it. In any case, I need to time to look at it, which I won't have until after JavaFX 19 RDP1, so let's leave this until then. ------------- PR: https://git.openjdk.org/jfx/pull/821
