On Tue, 28 Feb 2023 15:59:26 GMT, Eirik Bjorsnos <d...@openjdk.org> wrote:
> This PR suggests we add a vectorized equalsIgnoreCase benchmark to the set of > benchmarks in `org.openjdk.bench.jdk.incubator.vector`. This benchmark serves > as an example of how vectorization can be useful also in the area of text > processing. It takes advantage of the fact that ASCII and Latin-1 were > designed to optimize case-twiddling operations. > > The code came about during the work on #12632, where vectorization was deemed > out of scope. > > Benchmark results: > > > Benchmark (size) Mode Cnt Score Error > Units > EqualsIgnoreCaseBenchmark.scalar 16 avgt 15 21.575 ± 0.365 > ns/op > EqualsIgnoreCaseBenchmark.scalar 32 avgt 15 43.199 ± 2.786 > ns/op > EqualsIgnoreCaseBenchmark.scalar 64 avgt 15 71.389 ± 0.891 > ns/op > EqualsIgnoreCaseBenchmark.scalar 128 avgt 15 146.827 ± 1.115 > ns/op > EqualsIgnoreCaseBenchmark.scalar 1024 avgt 15 1062.759 ± 9.331 > ns/op > EqualsIgnoreCaseBenchmark.vectorized 16 avgt 15 21.483 ± 0.121 > ns/op > EqualsIgnoreCaseBenchmark.vectorized 32 avgt 15 10.538 ± 0.125 > ns/op > EqualsIgnoreCaseBenchmark.vectorized 64 avgt 15 13.182 ± 0.177 > ns/op > EqualsIgnoreCaseBenchmark.vectorized 128 avgt 15 19.192 ± 0.421 > ns/op > EqualsIgnoreCaseBenchmark.vectorized 1024 avgt 15 92.521 ± 3.494 > ns/op This pull request has now been integrated. Changeset: 9fc518ff Author: Eirik Bjorsnos <eir...@gmail.com> Committer: Sandhya Viswanathan <sviswanat...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/9fc518ff8cadbbb731a016d8f53ed065b3561a7c Stats: 157 lines in 1 file changed: 157 ins; 0 del; 0 mod 8303401: Add a Vector API equalsIgnoreCase micro benchmark Reviewed-by: ecaspole, sviswanathan, psandoz ------------- PR: https://git.openjdk.org/jdk/pull/12790