RFR: 8299671: speed up compiler/intrinsics/string/TestStringLatin1IndexOfChar.java
Emanuel Peter
epeter at openjdk.org
Thu Jan 5 15:32:23 UTC 2023
This test took very long, it was the slowest compiler test.
In total it took almost 3 minutes on my laptop. Now it is down to half a minute. The run statements also are about 10x faster now.
We could parallelize the run statements, but given that it is already fairly small the benefit is not so big, and it would imply overheads of parallelization, like loading libraries multiple times.
Goal of this test: trigger `indexOfChar` intrinsic inside the test functions. To trigger this reliably without too many repetitions of the test functions, we had set the flags `-XX:Tier4InvocationThreshold=200 -XX:CompileThreshold=100`. But this also triggers lots of other compilations, and makes everything slow.
I removed those flags, and used the white-box API to trigger compilation of the test functions. With sufficient warm-up, the paths to the intrinsic is hot, and we get intrinsification of `indexOfChar`.
-------------
Commit messages:
- 8299671: speed up compiler/intrinsics/string/TestStringLatin1IndexOfChar.java
Changes: https://git.openjdk.org/jdk/pull/11862/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11862&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8299671
Stats: 41 lines in 1 file changed: 33 ins; 0 del; 8 mod
Patch: https://git.openjdk.org/jdk/pull/11862.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/11862/head:pull/11862
PR: https://git.openjdk.org/jdk/pull/11862
More information about the hotspot-compiler-dev
mailing list