On Tue, 11 Mar 2025 08:44:51 GMT, Per Minborg <pminb...@openjdk.org> wrote:
>> What if instead you had a `@Stable` array of Object of the appropriate size, >> and populated each cell with a StableValue if the corresponding index was in >> the set, otherwise used a sentinel value. Then on the lookup, if it was the >> sentinel you throw, else you use the the SV. >> >> Also there is an awful lot of similarity between the enum function and the >> int function. Could one possibly be implemented using the other? > > Thanks for spotting this glitch. I have fixed the issue and added a test for > member sets with "holes". It might be worth exploring using a stable int function. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23972#discussion_r1991590911