On Wed, 20 Aug 2025 15:16:47 GMT, Chen Liang <li...@openjdk.org> wrote:

> > What do you mean by "works"? And why doesn't it work for the zeroes?
> 
> As descirbed by [the documentation of 
> `@Stable`](https://cr.openjdk.org/~jrose/jvm/Stable.html), a 0 value may be 
> interpreted as "uncomputed" for lazy values, and the compiler will refuse to 
> inline this value. As a result, in #26341, the 0 constants in arrays are 
> explicitly rewritten instead.

Making the `modulus` array @Stable does in fact achieve the same performance 
boost for nonzero modulus values. Thanks for the tip!

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

PR Comment: https://git.openjdk.org/jdk/pull/26792#issuecomment-3212357835

Reply via email to