On Mon, 21 Feb 2022 23:36:19 GMT, liach <d...@openjdk.java.net> wrote:
>> Might need a CSR as now `computeIfAbsent` `computeIfPresent` `compute` >> `merge` would throw CME if the functions modified the map itself, and there >> are corresponding specification changes. > > liach has updated the pull request incrementally with two additional commits > since the last revision: > > - merge branch 'identityhashmap-bench' of https://github.com/liachmodded/jdk > into identityhashmap-default > - fix whitespace Also re stuart: The relative performance of `putIfAbsent` versus `put` has always improved with this patch, now being 1.01 times of `put` call time while previously it was 1.2 times of it, regardless of jvm instance noise. My main concern is the performance hit brought by my move of the while loops in every method into a consolidated `findInterestingIndex`. This part is somehow harder to get consistent results, or should I make a clean copy of `IdentityHashMap` on new implementation and test (works only if there is no existing hotspot optimizations on `IdentityHashMap`) ------------- PR: https://git.openjdk.java.net/jdk/pull/6532