On Mon, 28 Oct 2024 21:26:38 GMT, Phil Race <[email protected]> wrote:

> https://bugs.openjdk.org/browse/JDK-8338677 already improved things for this 
> so that's good.
> 
> This fix adds to it lazy initialisation of VarHandles in StrikeCache at the 
> cost of some extra code.
> Since these VarHandles get used more or less immediately on Linux this new 
> fix won't further improve matters there
> But should help on Mac where they aren't usually needed at startup
> And Windows is somewhere in between.

Phil, I don’t understand your resistance to using the `@Stable` annotation, 
which is already exported by the `java.base` module to five other JDK modules. 
Yes, it’s marked `internal`, but that means “internal to the JDK,” not 
“internal to the base module.” There’s no conceptual uncleanliness here.

You could well be correct in saying that run-time performance is a complete 
non-issue, for all users at all times, but why not apply `@Stable` just in case 
it turns out to be an issue for some user at some time? Seems like cheap 
insurance.

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

PR Comment: https://git.openjdk.org/jdk/pull/21748#issuecomment-2523331075

Reply via email to