On Tue, 6 May 2025 11:56:04 GMT, Per Minborg <pminb...@openjdk.org> wrote:
>> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Review remarks > > src/java.base/share/classes/jdk/internal/foreign/abi/CapturableState.java > line 81: > >> 79: >> 80: public static CapturableState forName(String name) { >> 81: var ret = LOOKUP.get(name); > > As we usually have just one element (and for Windows three elements) it might > be both less memory consuming and faster to just search a `@Stable` array > linearly rather than having a Map. `Map.get` still has cleaner code than an array iteration, and there is already a Map1 optimized implementation. I think map is more friendly in the long run. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25025#discussion_r2075767137