On Wed, 15 May 2024 16:26:57 GMT, Chen Liang <li...@openjdk.org> wrote:
>> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Switch to monomorphic StableValue and use lazy arrays > > src/java.base/share/classes/jdk/internal/lang/stable/StableValueImpl.java > line 75: > >> 73: */ >> 74: @Stable >> 75: private int state; > > Can we change this to be a byte, so state and supplying fields can be packed > together in 4 bytes in some layouts? We had `byte` before but converted to `int` as the `byte` will get promoted to an `int` anyhow in the code logic. However, one idea would be to go back to using a `byte` again and also use a `byte` for the flag of computation invocation. This would reduce the footprint for these two fields from 8 bytes to 2 bytes. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18794#discussion_r1602800304