OpenHFT / Zero-Allocation-Hashing

Zero-allocation hashing for Java
Apache License 2.0
793 stars 136 forks source link

Add a performance testing for the LongHashFunction using JMH #79

Open gnodet opened 1 year ago

gnodet commented 1 year ago

This provides a simple performance test based on JMH for the LongHashFunction implementations. Here's the results on my laptop using OpenJDK 17.0.6:

Benchmark                               Mode  Cnt     Score     Error   Units
PerfTest.benchmarkCityAndFarmHash_1_1  thrpt    3  1946.640 ±  80.873  ops/ms
PerfTest.benchmarkMetroHash            thrpt    3  2403.670 ±  76.122  ops/ms
PerfTest.benchmarkMurmurHash_3         thrpt    3   727.741 ±  12.797  ops/ms
PerfTest.benchmarkXXH3                 thrpt    3  1879.180 ± 215.720  ops/ms
PerfTest.benchmarkXxHash               thrpt    3  1714.654 ± 232.981  ops/ms