Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize the memory footprint of
MapMakerInternalMap
entries by spe…
…cial-casing linked entries. The first entry in each bucket does not need a `next` field because it will only ever be the tail of the bucket's linked list. Because `MapMakerInternalMap` uses a load factor of 0.75, we can expect that most entries are tails, so long as the hash function is good. For the common use case of a weak interner with compressed OOPs, omitting the `next` field reduces the shallow heap of `WeakKeyDummyValueEntry` from 40 bytes to 32 bytes. RELNOTES=Memory optimizations for `Interner` and `MapMaker` PiperOrigin-RevId: 479157599
- Loading branch information