com.netflix.atlas.core.util
Members list
Type members
Classlikes
Benchmark Mode Cnt Score Error Units
BoxesRuntime.javaEquals thrpt 10 112495954.095 ± 2795842.625 ops/s
BoxesRuntime.scalaEquals thrpt 10 82963668.047 ± 6225820.287 ops/s
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Sanity check for integer hash set.
Sanity check for integer hash set.
> run -wi 10 -i 10 -f1 -t1 .*IntIntMap.*
...
load factor of 0.7
[info] Benchmark Mode Cnt Score Error Units
[info] IntIntMap.testIntIntHashMap800 thrpt 10 10374.640 ± 782.568 ops/s
[info] IntIntMap.testIntIntHashMap8k thrpt 10 589.537 ± 8.124 ops/s
[info] IntIntMap.testJavaHashMap800 thrpt 10 4051.768 ± 499.362 ops/s
[info] IntIntMap.testJavaHashMap8k thrpt 10 2846.103 ± 14.858 ops/s
load factor of 0.5
[info] Benchmark Mode Cnt Score Error Units
[info] IntIntMap.testIntIntHashMap800 thrpt 10 11713.871 ± 271.158 ops/s
[info] IntIntMap.testIntIntHashMap8k thrpt 10 3963.805 ± 59.359 ops/s
[info] IntIntMap.testJavaHashMap800 thrpt 10 4371.380 ± 93.346 ops/s
[info] IntIntMap.testJavaHashMap8k thrpt 10 2709.591 ± 71.376 ops/s
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Sanity check for integer hash set.
Sanity check for integer hash set.
> run -wi 10 -i 10 -f1 -t1 .*IntSet.*
...
[info] Benchmark Mode Cnt Score Error Units
[info] IntSet.testIntHashSet thrpt 10 478541.525 ± 29615.965 ops/s
[info] IntSet.testIntHashSet10k thrpt 10 1531.614 ± 73.903 ops/s
[info] IntSet.testJavaHashSet thrpt 10 376161.309 ± 5242.341 ops/s
[info] IntSet.testJavaHashSet10k thrpt 10 2169.164 ± 126.964 ops/s
[info] IntSet.testTroveHashSet thrpt 10 416539.087 ± 29554.649 ops/s
[info] IntSet.testTroveHashSet10k thrpt 10 1813.617 ± 30.182 ops/s
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Sanity check performance of utility for merging sorted lists.
Sanity check performance of utility for merging sorted lists.
> jmh:run -wi 10 -i 10 -f1 -t1 .*ListMerge.*
...
Benchmark Mode Cnt Score Error Units
ListMerge.hashSet thrpt 10 0.386 ± 0.021 ops/s
ListMerge.merge thrpt 10 42.918 ± 2.044 ops/s
ListMerge.sortedSet thrpt 10 0.238 ± 0.007 ops/s
ListMerge.treeSet thrpt 10 0.316 ± 0.016 ops/s
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Sanity check performance of utility for merging sorted lists.
Sanity check performance of utility for merging sorted lists.
> jmh:run -prof jmh.extras.JFR -wi 10 -i 10 -f1 -t1 .*ListMergeCommonPrefix.*
...
Benchmark Mode Cnt Score Error Units
ListMergeCommonPrefix.merge thrpt 10 8.700 ± 0.160 ops/s
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
There was an old suggestion that max via bit manip would be faster and avoid branch instructions. That doesn't appear to be the case:
There was an old suggestion that max via bit manip would be faster and avoid branch instructions. That doesn't appear to be the case:
> run -wi 10 -i 10 -f1 -t1 .*MathMax.*
...
[info] Benchmark Mode Samples Score Score error Units
[info] c.n.a.c.u.MathMax.testMaxWithBitManip thrpt 10 849801537.629 13395055.478 ops/s
[info] c.n.a.c.u.MathMax.testMaxWithIf thrpt 10 1015950530.655 14758001.309 ops/s
[info] c.n.a.c.u.MathMax.testMaxWithScalaMath thrpt 10 1021526747.880 8691594.381 ops/s
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Check the overhead of java wrapper for use-cases that iterate over the entry set.
Check the overhead of java wrapper for use-cases that iterate over the entry set.
> jmh:run -prof gc -wi 10 -i 10 -f1 -t1 .*SmallHashMapEntrySet.*
...
Benchmark Mode Cnt Score Error Units
customEntrySet thrpt 10 13480190.254 ± 351370.866 ops/s
scalaEntrySet thrpt 10 7782130.178 ± 514660.491 ops/s
customEntrySet gc.alloc.rate.norm 10 24.000 ± 0.001 B/op
scalaEntrySet gc.alloc.rate.norm 10 272.000 ± 0.001 B/op
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Check performance of comparing small hash maps for equality.
Check performance of comparing small hash maps for equality.
> jmh:run -prof jmh.extras.JFR -wi 10 -i 10 -f1 -t1 .*SmallHashMapEquals.*
...
[info] Benchmark Mode Cnt Score Error Units
[info] currentEquals thrpt 10 47004215.059 ± 2291847.719 ops/s
[info] inheritedEquals thrpt 10 2134457.383 ± 111821.520 ops/s
[info] dataEquals thrpt 10 51326103.645 ± 758297.787 ops/s
[info] selfEquals thrpt 10 351279563.043 ± 18578115.816 ops/s
[info] currentEqualsNot thrpt 10 273893522.221 ± 7980051.600 ops/s
[info] inheritedEqualsNot thrpt 10 2341207.187 ± 206356.584 ops/s
[info] dataEqualsNot thrpt 10 32392263.165 ± 1289262.059 ops/s
[info] currentEqualHashCodes thrpt 10 14601802.119 ± 360902.793 ops/s
[info] inheritedEqualHashCodes thrpt 10 483515.784 ± 10044.781 ops/s
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
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.
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
- Supertypes
-
class Objecttrait Matchableclass Any
Check the overhead of java wrapper for use-cases that perform a lot of get calls.
Check the overhead of java wrapper for use-cases that perform a lot of get calls.
> jmh:run -prof gc -wi 10 -i 10 -f1 -t1 .*SmallHashMapJavaGet.*
...
[info] Benchmark Mode Cnt Score Error Units
[info] customGetFound thrpt 10 94270900.203 ± 5825997.538 ops/s
[info] customGetNotFound thrpt 10 6799704.339 ± 462769.738 ops/s
[info] scalaGetFound thrpt 10 85325015.251 ± 4367808.653 ops/s
[info] scalaGetNotFound thrpt 10 6385962.734 ± 318520.923 ops/s
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Check performance of creating a copy of the map when adding/removing a single pair.
Check performance of creating a copy of the map when adding/removing a single pair.
> jmh:run -prof gc -wi 10 -i 10 -f1 -t1 .*SmallHashMapModify.*
...
[info] Benchmark Mode Cnt Score Error Units
[info] SmallHashMapModify.addPair thrpt 5 2541571.202 ± 239240.513 ops/s
[info] SmallHashMapModify.removePair thrpt 5 3840622.669 ± 439259.261 ops/s
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Results:
> jmh:run -wi 10 -i 10 -f1 -t1 .*StringIntern.*
Results:
Benchmark Mode Cnt Score Error Units
caffeineIntern100 thrpt 10 5030.208 ± 179.907 ops/s
caffeineIntern50 thrpt 10 689.302 ± 36.348 ops/s
customIntern thrpt 10 1249.873 ± 32.805 ops/s
javaIntern thrpt 10 664.655 ± 40.109 ops/s
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
There was an old suggestion that max via bit manip would be faster and avoid branch instructions. That doesn't appear to be the case:
There was an old suggestion that max via bit manip would be faster and avoid branch instructions. That doesn't appear to be the case:
> run -wi 10 -i 10 -f1 -t1 .*StringMatching.*
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Regex OR queries have terrible performance. In many cases these can be rewritten to a set of startsWith or indexOf patterns in the string matcher. On some of the real data and queries this was up to 20 times faster. For the quick sample data in this benchmark it is 8 to 15 times faster.
Regex OR queries have terrible performance. In many cases these can be rewritten to a set of startsWith or indexOf patterns in the string matcher. On some of the real data and queries this was up to 20 times faster. For the quick sample data in this benchmark it is 8 to 15 times faster.
> run -wi 10 -i 10 -f1 -t1 .*StringMatchingOr.*
[info] Benchmark Mode Cnt Score Error Units
[info] StringMatchingOr.testOrMatcher08 thrpt 10 953.969 ± 57.275 ops/s
[info] StringMatchingOr.testOrMatcher32 thrpt 10 437.536 ± 32.653 ops/s
[info] StringMatchingOr.testRegex08 thrpt 10 117.730 ± 18.946 ops/s
[info] StringMatchingOr.testRegex32 thrpt 10 29.162 ± 1.151 ops/s
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Sanity check prefix matching and the benefits of short ciruiting with a startsWith check before falling back to the regex matcher.
Sanity check prefix matching and the benefits of short ciruiting with a startsWith check before falling back to the regex matcher.
> run -wi 10 -i 10 -f1 -t1 .*StringMatchingPrefix.*
[info] Benchmark Mode Cnt Score Error Units
[info] StringMatchingPrefix.matcher thrpt 10 10314.028 ± 191.544 ops/s
[info] StringMatchingPrefix.regex thrpt 10 3431.614 ± 350.880 ops/s
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Quick sanity check on substitute changes. Main goal is to reduce some of the allocations seen in batch use-cases.
Quick sanity check on substitute changes. Main goal is to reduce some of the allocations seen in batch use-cases.
> run -wi 10 -i 10 -f1 -t1 .*StringSub.*
Initial results:
[info] Benchmark Mode Cnt Score Error Units
[info] StringSub.testParsingByHand thrpt 10 2223516.436 ± 43697.844 ops/s
[info] StringSub.testUsingRegex thrpt 10 267252.094 ± 6066.379 ops/s
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
> run -bm all -wi 10 -i 10 -f1 -t1 .*TimeWaveCalc.*
...
[info] Benchmark Mode Cnt Score Error Units
[info] TimeWaveCalc.testMathSin thrpt 10 11484308.329 ± 729466.777 ops/s
[info] TimeWaveCalc.testPrecomputeSin thrpt 10 39806386.423 ± 868184.835 ops/s
[info] TimeWaveCalc.testMathSin avgt 10 ≈ 10⁻⁷ s/op
[info] TimeWaveCalc.testPrecomputeSin avgt 10 ≈ 10⁻⁸ s/op
[info] TimeWaveCalc.testMathSin sample 110059 ≈ 10⁻⁷ s/op
[info] TimeWaveCalc.testPrecomputeSin sample 163664 ≈ 10⁻⁷ s/op
[info] TimeWaveCalc.testMathSin ss 10 ≈ 10⁻⁶ s/op
[info] TimeWaveCalc.testPrecomputeSin ss 10 ≈ 10⁻⁶ s/op
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Check use of String.format
against just padding with our custom Strings.zeroPad
.
Check use of String.format
against just padding with our custom Strings.zeroPad
.
> jmh:run -prof gc -wi 10 -i 10 -f1 -t1 .*ZeroPad.*
Throughput
Benchmark Mode Cnt Score Error Units
hashArrayPad thrpt 10 4721308.898 ± 151781.009 ops/s
hashBigIntPad thrpt 10 867143.537 ± 19475.920 ops/s
hashFormat thrpt 10 519479.340 ± 36074.274 ops/s
oneArrayPad thrpt 10 7666430.180 ± 727283.845 ops/s
oneBigIntPad thrpt 10 3212304.227 ± 235176.496 ops/s
oneFormat thrpt 10 964090.075 ± 39087.882 ops/s
Allocations
hashArrayPad gc.alloc.rate.norm 10 240.000 ± 0.001 B/op
hashBigIntPad gc.alloc.rate.norm 10 1824.000 ± 0.001 B/op
hashFormat gc.alloc.rate.norm 10 3344.000 ± 0.001 B/op
oneArrayPad gc.alloc.rate.norm 10 240.000 ± 0.001 B/op
oneBigIntPad gc.alloc.rate.norm 10 664.000 ± 0.001 B/op
oneFormat gc.alloc.rate.norm 10 2176.000 ± 0.001 B/op
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any