You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Verified on bare-metal Linux: AMD Ryzen 7 5700X (8C/16T), NixOS 26.11, kernel 7.2.0, rustc 1.96.0, t=8, --sample-count 100 --sample-size 10000, interleaved rounds ×3 against base (c461305) and #205's head (6c55ca4). Values are medians of the 3 round-medians; per-round variance was <5% throughout, including the churn scenarios.
The headline wins reproduce: 8.5–9.5× on disjoint hits, 12–13.7× on miss_churn/mixed/work_disjoint_churn (below the 16–24× on the 9950X, still decisive).
The same-key penalty is milder here: get_hit_same_key −9% vs base, compute_hit_same_key on par, work_same_key +15%.
Question: the branch only contains the Mutex-shard variant; the parking_lot::RwLock column from the table doesn't seem to be in the code. Is that variant pushed anywhere?
The two approaches look complementary: sharding covers disjoint/churn, a shared reader path plus the hit shortcut from 6c55ca4 covers same-key. A per-shard reader path on top of this PR should cover every scenario — happy to help with that.
Refactor the storage of OnceMap, add a concurrent index for Ready values.
This makes the current implementation significantly superior to other solutions when using two or more threads.
Also fixed some issues in benchmarks, there is still too much variance in the results.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Alternative of #205
Improvements
CPU: AMD Ryzen 9 9950X
OS: NixOS 25.11
Thread: 8
Thread: 32