RFR: 8367754: G1: Add a fast path in heap resize related method [v3]
Thomas Schatzl
tschatzl at openjdk.org
Fri Sep 19 10:05:20 UTC 2025
On Thu, 18 Sep 2025 13:16:04 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> > ... thereby avoiding unnecessary computation
>
> That's absolutely true; however, the real expensive part is not the calculation but actual resizing (commit/uncommit).
>
> Since the existing logic is not simplified by the use of early-return, I feel it hinders readability slightly. I wonder what others think.
I agree with the evaluation where the actual costs are. I think the intent of the change is fine, although not absolutely necessary. That is why I suggested to avoid the new member variable. I am good either way (drop or keep) though.
Thomas
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27349#issuecomment-3311543910
More information about the hotspot-gc-dev
mailing list