RFR: 8321279: Implement hashCode() in Heap-X-Buffer.java.template [v3]
Sergey Tsypanov
stsypanov at openjdk.org
Sun Dec 10 19:19:13 UTC 2023
On Fri, 8 Dec 2023 06:27:02 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Sergey Tsypanov has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8321279: Fix hashCode()
>
> Are you planning to add a microbenchmark?
@AlanBateman added a benchmark for this. Currently I'm working on Windows and run the benchmark on Linux image on Oracle VM VirtualBox, I guess this is the reason why the improvement is not that impressive
master
Benchmark (size) Mode Cnt Score Error Units
ByteBuffers.testHashCode 16 avgt 30 8.712 ? 0.180 ns/op
ByteBuffers.testHashCode 1024 avgt 30 641.727 ? 10.785 ns/op
ByteBuffers.testHashCode 131072 avgt 30 86610.737 ? 1569.968 ns/op
patch
Benchmark (size) Mode Cnt Score Error Units
ByteBuffers.testHashCode 16 avgt 30 8.699 ? 0.048 ns/op
ByteBuffers.testHashCode 1024 avgt 30 633.038 ? 6.090 ns/op
ByteBuffers.testHashCode 131072 avgt 30 82270.905 ? 927.101 ns/op
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16992#issuecomment-1849055906
More information about the nio-dev
mailing list