RFR: 8367472: Swap conditions order in PSScavengeCLDOopClosure::do_oop(oop*)
Thomas Schatzl
tschatzl at openjdk.org
Fri Sep 12 07:55:13 UTC 2025
On Thu, 11 Sep 2025 22:36:52 GMT, Francesco Andreuzzi <fandreuzzi at openjdk.org> wrote:
> In this PR I propose to swap the order of conditions in `PSScavengeCLDOopClosure::do_oop`, as proposed during the review of #27199. This change will move the trivial check first in the `if` clause, which is easier for the reader and potentially for the branch predictor. This will also bring parity with `CLDOopClosure` (Serial).
>
> Passes `tier1`.
Marked as reviewed by tschatzl (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/27237#pullrequestreview-3215246802
More information about the hotspot-gc-dev
mailing list