On Wed, 18 Sep 2024 23:53:28 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:
>> Roman Kennke has updated the pull request incrementally with one additional >> commit since the last revision: >> >> JVMCI support > > src/hotspot/share/oops/compressedKlass.hpp line 175: > >> 173: // 5b) if CDS=off: Calls initialize() - here, we have more freedom >> and, if we want, can choose an encoding >> 174: // base that differs from the reservation base from step (4). >> That allows us, e.g., to later use >> 175: // zero-based encoding. > > Not for this but is there really any benefit for zero based encoding for > klass ids? Yes, I think so. I think the SAP Jit people investigated this when doing the PPC ports. You save at least two instructions, and possibly more, per decode op. You save code size too since you don't need to materialize the 64-bit base immediate. Especially on x64 this can mean easily 11 fewer bytes. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20677#discussion_r1766681110