We use a per-thread cache to hold the values of the most-recently-used scoped values. This avoids repeated lookups at runtime. However, we could generate better code if C2 took advantage of the fact that scoped-value bindings are immutable. This would make the performance of scoped values more predictable and we may be able to reduce the memory usage of the scoped-value cache.
- links to
-
Review(master) openjdk/jdk/16966