RFR: 8299970: Speed up compiler/arraycopy/TestArrayCopyConjoint.java

Emanuel Peter epeter at openjdk.org
Wed Feb 8 14:52:41 UTC 2023


I lowered the iteration count from `1000_000` (million) down to `30_000` (30k). I also removed a `try-catch` statement that seems to serve no purpose, but may actually prevent us from detecting failures of the test.

Per `@run` statement, I got the runtime down from about `4-4.5 sec` to `1-1.3 sec` (3-4x speedup).

**Details**
I ran the test with `-XX:+PrintCompilation -XX:+PrintInlining -XX:-TieredCompilation -XX:CICompilerCount=1 -Xbatch`, and then analyzed the output with this `cat txt.txt  | sed -n -e "s/.*java.lang.System::(\w*).*intrinsic.*/\1/p" | sort | uniq -c`, which gives me the count for the `arraycopy` intrinsification. For `1000_000` and `30_000` iterations I got `336` intrinisifications, so I am not losing any. I also tried to lower the iterations further down to `10_000`, but that did only marginally lower the runtime, to `1 sec`, but with much less intrinsifications, only `144`. So I decided to stay at `30k`.

If this fix does not turn out to be sufficient, we can try an IR test, and trigger compilation of the test methods after a much smaller iteration count for warmup (after all we want to make sure intrinsification happens), and then verify that the intrinsic is in the IR.

-------------

Commit messages:
 - fix copyright year
 - 8299970: Speed up compiler/arraycopy/TestArrayCopyConjoint.java

Changes: https://git.openjdk.org/jdk/pull/12475/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12475&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8299970
  Stats: 7 lines in 1 file changed: 0 ins; 5 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/12475.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/12475/head:pull/12475

PR: https://git.openjdk.org/jdk/pull/12475


More information about the hotspot-compiler-dev mailing list