RFR: 8373256: [leyden] Pack DataKind more densely in archive

Vladimir Kozlov kvn at openjdk.org
Mon Dec 8 15:36:01 UTC 2025


On Mon, 8 Dec 2025 13:25:29 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> Spotting a little inefficiency when looking at related code. `DataKind` is always stored as `int`, but its values are actually comfortably fitting in byte. Going to `int8_t` saves about 1% of AOT cache size. If this ever becomes a problem, we can always revert back to `int32_t`. I looked around other uses of `write_bytes`, and I believe `DataKind` is the most obvious opportunity.
> 
> Additional testing:
>  - [x] Linux x86_64 server fastdebug, `runtime/cds`

I don't think it is good optimization. The following data is assumed 4-bytes aligned when we read it. See `read_method()` and `read_klass()`.

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

PR Review: https://git.openjdk.org/leyden/pull/105#pullrequestreview-3552662068


More information about the leyden-dev mailing list