RFR: 8342692: C2: MemorySegment API slow with short running loops [v3]

Roland Westrelin roland at openjdk.org
Fri Oct 25 15:23:05 UTC 2024


On Fri, 25 Oct 2024 06:58:36 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>> Roland Westrelin has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   build fix
>
> src/hotspot/share/opto/c2_globals.hpp line 810:
> 
>> 808:           "of constructors")                                                \
>> 809:                                                                             \
>> 810:   product(uintx, ShortLoopIter, 1000,                                       \
> 
> May I ask why this is such a small value, why is it not a value that is closer to the limit of an `int` loop, such as 10^6?

1000 happens to be the loop strip mining limit too. So by restricting the number of iterations to 1000, we also get rid of the outer loop for loop strip mining.
It could make sense to have a similar mechanism for loop strip mining and then have long counted loops and loop strip mined loops have their own tests for what's a small number of iterations.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21630#discussion_r1816910154


More information about the hotspot-compiler-dev mailing list