On Wed, 12 Mar 2025 01:29:26 GMT, John Hendrikx <jhendr...@openjdk.org> wrote:

>> Is a switch expression on `listenerData` not suitable here?
>
> This is a really hot code path, and the current version came out best in the 
> benchmarks. I didn't try modify this one for that reason.  I did try for the 
> `removeListener` code (as performance is irrelevant there), but it was a poor 
> fit for `switch` (duplicate cases, duplicate code, and can't do fall through 
> or multiple options with `when` expressions it seems...)

If the benchmarks deem this a better implementation then it's fine. I was just 
wondering if it was missed.

The `removeListener` one is indeed not as appetizing.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1081#discussion_r1990392759

Reply via email to