On Tue, 8 Sep 2026 14:20:12 GMT, Per Minborg <[email protected]> wrote:

> This PR proposes to improve the performance of the newly integrated confined 
> arena cache. Confined arenas now remember the platform pool array and the 
> pool array index used for pool acquisition. Upon closing the arena, the pool 
> can be returned (in most cases) directly to the correct index in the confined 
> arena cache.
> 
> If the opportunistic pool index is occupied, the logic falls back to the 
> regular path, which scans the array for an empty slot.
> 
> The PR additionally proposes to add a test to make sure the unusual release 
> path works correctly. 
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Benchmark on an M4 Mac:

Base:


Benchmark                                   (size)  Mode  Cnt   Score   Error  
Units
AllocTest.OfVirtual.alloc_confined               5  avgt   30   3.261 ± 0.113  
ns/op
AllocTest.alloc_confined                         5  avgt   30   1.072 ± 0.031  
ns/op


Patch:

Benchmark                           (size)  Mode  Cnt  Score   Error  Units
AllocTest.OfVirtual.alloc_confined       5  avgt   30  3.106 ± 0.240  ns/op
AllocTest.alloc_confined                 5  avgt   30  0.817 ± 0.016  ns/op  
<-- about 24% improvement (on ns scale)

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

PR Comment: https://git.openjdk.org/jdk/pull/32766#issuecomment-5586649832

Reply via email to