RFR: 8343056: C2: Micro-optimize Node lists grow
Aleksey Shipilev
shade at openjdk.org
Fri Oct 25 11:18:39 UTC 2024
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`
-------------
Commit messages:
- Fix
Changes: https://git.openjdk.org/jdk/pull/21707/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21707&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8343056
Stats: 27 lines in 4 files changed: 14 ins; 6 del; 7 mod
Patch: https://git.openjdk.org/jdk/pull/21707.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/21707/head:pull/21707
PR: https://git.openjdk.org/jdk/pull/21707
More information about the hotspot-dev
mailing list