RFR: 8348880: Replace ConcurrentMap with AtomicReferenceArray for ZoneOffset.QUARTER_CACHE [v8]

Chen Liang liach at openjdk.org
Wed Jan 29 15:35:57 UTC 2025


On Wed, 29 Jan 2025 10:38:39 GMT, altrisi <duke at openjdk.org> wrote:

> That'd lower the constant memory overhead added by this change, as the CHM started smaller.

We use a size of 256 so C2 can apply array bound check elimination as it knows the resulting value from `& 0xFF` is ensured to be in the range of `[0, 255]`, which is always valid for the array, so its generated code will drop the bound check.

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

PR Comment: https://git.openjdk.org/jdk/pull/23337#issuecomment-2621982177


More information about the core-libs-dev mailing list