RFR: 8357726: Improve C2 to recognize counted loops with multiple casts in trip counter
Xiaohong Gong
xgong at openjdk.org
Wed Jun 25 01:19:47 UTC 2025
On Wed, 4 Jun 2025 09:03:21 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Hi @eme64 , I'v updated the IR test and JMH based on your comments. Could you please help review whether it's fine to you. Thanks for all your suggestion!
>>
>> Following shows the performance data of the new JMH test on Grace (the performance gain is almost the same on my x64 machine):
>>
>> Benchmark Mode Cnt limit Unit Before Error (99.9%) After Error (99.9%) Gain
>> CountedLoopCastIV.loop_iv_int thrpt 30 1024 ops/s 1225620.536 39505.158362 5778120.132 4781.602088 4.71
>> CountedLoopCastIV.loop_iv_int thrpt 30 1536 ops/s 830600.832 14758.561182 3839404.338 3362.727083 4.62
>> CountedLoopCastIV.loop_iv_int thrpt 30 2048 ops/s 618114.174 36999.511727 2890853.495 416.969862 4.67
>> CountedLoopCastIV.loop_iv_long thrpt 30 1024 ops/s 1063902.078 4616.608855 1314828.963 1267.470199 1.23
>> CountedLoopCastIV.loop_iv_long thrpt 30 1536 ops/s 714538.178 630.085477 870801.472 753.347684 1.21
>> CountedLoopCastIV.loop_iv_long thrpt 30 2048 ops/s 536724.086 131.313178 652775.363 539.107806 1.21
>>
>>
>> The error term is larger as before. But I don't think this is caused by the large variance of loop iterations. Does the new benchmark look fine to you? Thanks!
>
> @XiaohongGong Let's please delay this until after Thursday, so that this does not go into JDK25 yet, and we have more time to fix it if something goes wrong down the line.
Thanks so much for your review @eme64 @chhagedorn @galderz !
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25539#issuecomment-3002291747
More information about the hotspot-compiler-dev
mailing list