On Mon, 11 Jul 2022 21:12:02 GMT, Kevin Rushforth <k...@openjdk.org> wrote:

>> 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.

you bring a good point, Kevin, thank you!

-------------

PR: https://git.openjdk.org/jfx/pull/821

Reply via email to