SmallHashMapHashCode

com.netflix.atlas.core.util.SmallHashMapHashCode

Check performance of computing the hash code for a small hash map. Note it will cache after the first run, see test with caching. However, the murmur3* tests are more interesting as they indicate the performance for the initial computation which is often in the critical path for new tag maps.

> jmh:run -prof jmh.extras.JFR -wi 10 -i 10 -f1 -t1 .*SmallHashMapHashCode.*
...
[info] Benchmark              Mode  Cnt          Score          Error  Units
[info] computeHashCode       thrpt   10   33962020.269 ±   883664.164  ops/s
[info] currentHashCode       thrpt   10  360180789.347 ± 10164654.707  ops/s
[info] murmur3arrayHash      thrpt   10   13861013.249 ±  3160191.522  ops/s
[info] murmur3mapHash        thrpt   10    4067194.458 ±    78185.171  ops/s

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def computeHashCode(bh: Blackhole): Unit
def currentHashCode(bh: Blackhole): Unit
def murmur3arrayHash(bh: Blackhole): Unit
def murmur3mapHash(bh: Blackhole): Unit