RFR: 8320649: C2: Optimize scoped values [v9]

Andrew Haley aph at openjdk.org
Thu Feb 29 16:02:50 UTC 2024


On Mon, 26 Feb 2024 16:18:17 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

> Ah, one more thing: what about a JMH benchmark where you can show off how much this optimization improves runtime? ;)

We already have benchmarks, but the biggest win due to this change is the opportunity to reduce the load on the scoped value cache.

At present, high performance depends on the per-thread cache, which is a 16-element OOP array. This is a fairly heavyweight structure for virtual threads, which otherwise have a very small heap footprint. With this optimization I think I can shrink the cache without significant loss of performance in most cases. I might also be able to move this cache to the carrier thread.

So, this patch significantly moves the balance point in the space/speed tradeoff.

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

PR Comment: https://git.openjdk.org/jdk/pull/16966#issuecomment-1971449329


More information about the hotspot-compiler-dev mailing list