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

Christian Hagedorn chagedorn at openjdk.org
Wed Feb 8 16:22:41 UTC 2023


On Wed, 8 Feb 2023 14:09:10 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

> 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.

That looks reasonable.

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

Marked as reviewed by chagedorn (Reviewer).

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


More information about the hotspot-compiler-dev mailing list