RFR: 8320649: C2: Optimize scoped values [v9]
Emanuel Peter
epeter at openjdk.org
Mon Mar 4 09:40:56 UTC 2024
On Thu, 29 Feb 2024 16:00:15 GMT, Andrew Haley <aph at openjdk.org> wrote:
>> Ah, one more thing: what about a JMH benchmark where you can show off how much this optimization improves runtime? ;)
>
>> 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.
@theRealAph that is exciting! It's a bit scary to have over 2000 lines for this optimization, makes it quite hard to review. But let's keep working on it 😊
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16966#issuecomment-1976131672
More information about the hotspot-compiler-dev
mailing list