AugustNagro / utf8.java

Vectorized UTF-8 Validation for Java
62 stars 7 forks source link

Merge benchmarks into one class #5

Closed amCap1712 closed 2 years ago

amCap1712 commented 2 years ago

JIT inlining is per call site, each call site sees only one lookup table implementation. Also, each the benchmark method is run in a fork JVM. Hence, wouldn't interfere with inlining anyways. Attached results support this:

Merged:

Benchmark                        (testFile)   Mode  Cnt       Score      Error  Units
BenchJDK.vector_256           /twitter.json  thrpt    5    4784.039 ±   61.119  ops/s
BenchJDK.vector_256          /utf8-demo.txt  thrpt    5   98376.622 ± 2252.414  ops/s
BenchJDK.vector_256  /utf8-demo-invalid.txt  thrpt    5   99048.892 ± 1526.062  ops/s
BenchJDK.vector_256                /20k.txt  thrpt    5  252706.382 ± 1405.361  ops/s

Separate

Benchmark                        (testFile)   Mode  Cnt       Score      Error  Units
Bench256.vector_256           /twitter.json  thrpt    5    4714.613 ±   79.494  ops/s
Bench256.vector_256          /utf8-demo.txt  thrpt    5   98768.308 ± 1584.935  ops/s
Bench256.vector_256  /utf8-demo-invalid.txt  thrpt    5   98432.536 ± 2298.490  ops/s
Bench256.vector_256                /20k.txt  thrpt    5  255934.510 ± 3232.060  ops/s
AugustNagro commented 2 years ago

Thanks Kartik