RFR: 8371667: Shenandoah: Re-design alloc request type enum for better efficiency and cleaner code [v13]

Xiaolong Peng xpeng at openjdk.org
Mon Nov 17 18:26:12 UTC 2025


On Mon, 17 Nov 2025 17:47:53 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

> Regarding the original code, was that release-build code, with optimization? That looks more like slowdebug code. I would have expected a computed goto rather than cascaded if-then-elses.
> 
> With computed-goto and with range checks, I suspect there may still be issues with branch-prediction efficiency in hardware. Do we see any measurable impact on performance?

It was release-build code, I used https://godbolt.org to generated the assembly code for comparison, the one in description is less optimization, here is the one with `-O3` flag: https://godbolt.org/z/3317zYqYh

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

PR Comment: https://git.openjdk.org/jdk/pull/28247#issuecomment-3543298577


More information about the hotspot-gc-dev mailing list