Repository navigation
Skip read validation for immutable shards - #853
Conversation
eef7257 to
e0f2d65
Compare
e0f2d65 to
031f1e9
Compare
|
CPU the win on ARM should be larger than x86. A minor plumbing thing that'd be good to fix- |
|
I dug into this a little more: while Will follow up with some improvements based on your notes. |
|
Added checks at the public snapshot and delta entry points, as you suggested. When a type uses the immutable-shard fast path, passing a recycling recycler now fails before any state is changed. Added regression tests for both entry points across objects, lists, sets, and maps. |
d22d484 to
3b27656
Compare
3b27656 to
2bf476a
Compare
|
Added Also added |
This avoids the trailing read validation when the underlying arrays are known to never be reused. This is a first in a series of pull requests in a stack that use the fact that arrays are not recycled as an invariant for further optimisation.
This builds on the work in #647. It added
GarbageCollectorAwareRecyclerand selectsWastefulRecyclerfor concurrent garbage collectors, but does not remove the synchronization cost required byRecyclingRecycler.Optimization Opportunities
In a 30-second Images CPU profile on JDK 25 with ZGC, Hollow appeared in 26.8% of samples. More than half of that time was concentrated in two low-level read operations:
The attribution to validation may include stalls from the preceding data load, rather than time spent executing the fence itself. The remaining cost was spread across object fields, strings, collections, and primary-key lookups. This PR starts a stack that removes unnecessary validation for immutable shards, then optimizes the underlying fixed-length, string, collection, and byte read paths.
Local x86-64 microbenchmarks on JDK 25 with ZGC have not shown a repeatable improvement for this PR alone: one comparison of random long reads was slower, and a repeat was at parity. This is a different workload from Images, and the later PRs address more of the read path.