86730f53ca
Motivation: The uncached access to PoolChunk can be made faster, and avoid allocating boxed Longs, if we have a primitive hash map and priority queue implementation for it. Modification: Add bespoke primitive implementations of a hash map and a priority queue for PoolChunk. Remove all the long-boxing caused by the previous implementation. The hashmap is a linear probing map with a fairly short probe that keeps the search within a couple of cache lines. The priority queue is the same binary heap algorithm that's described in Algorithms by Sedgewick and Wayne. The implementation avoids the Long boxing by relying on a long[] array. This makes the internal-remove method faster, which is an important operation in PoolChunk. Result: Roughly 13% performance uplift in buffer allocations that miss cache. |
||
---|---|---|
.. | ||
src | ||
pom.xml |