RFR: 8343056: C2: Micro-optimize Node lists grow
Aleksey Shipilev
shade at openjdk.org
Fri Oct 25 11:18:39 UTC 2024
On Fri, 25 Oct 2024 09:44:23 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> Seen this in Leyden profiles, but it is a generic issue. The profiles show `Node::grow` and `VectorSet::grow` as hot methods. The methods are small, and since they are implementing doubling-the-array scheme, we often exit early without actually growing. Outlining the actual growing part from the capacity check would allow inlining the common case.
>
> I'll put some performance data in the comments.
>
> Additional testing:
> - [x] Linux x86_64 server fastdebug, `tier1`
On various tests on x86_64, this gives me +3% faster runs in -Xcomp scenarios.
## -Xcomp -XX:-TieredCompilation Hello
# Before
Time (mean ± σ): 617.0 ms ± 3.8 ms [User: 584.8 ms, System: 31.0 ms]
Range (min … max): 612.5 ms … 625.7 ms 20 runs
# After
Time (mean ± σ): 596.0 ms ± 5.8 ms [User: 562.3 ms, System: 32.5 ms]
Range (min … max): 588.6 ms … 610.6 ms 20 runs
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21707#issuecomment-2437366117
More information about the hotspot-dev
mailing list