Closed gzm55 closed 4 years ago
Did you run benchmarks? Is the new approach actually faster?
@leventov Here is the jmh profiling results on the new access v.s. the original generic one. The three set of results are from the same perf branch.
For the getByte()
methods, the tests covers aligned and unaligned offsets, others only aligned offsets. Each methods are tested for Latin1 and UTF16 strings. Latin1 ones are processed by the new compact access, while the UTF16 ones are processed by the unsafe access.
@leventov any time to review this pr and the benchmark result?
Add
ModernCompactStringHash
andCompactLatin1CharSequenceAccess
to support JDK 9's compact string.Close #20