Repository navigation
Conversation
…arallel before Process
…ze presort entries with unsafe.Sizeof
…uilder so Process finds the trie built
… its chunk buffers
…instead of 256 nibble buckets
…hash plus prefix-trie lookup
… cost 2.5x what it saved
…stigation benchmarks
…unk threshold and the unreachable nil-trie guard
…ies and pin the trie flattener
…ilder inside the touch benchmark
… and leaking its builder
…ain the builder on SetMode
…kground-trie-build # Conflicts: # execution/commitment/parallel_streaming_bench_test.go
…lives its work; tighten chunk tests
…a key touched in several chunks
Collaborator
|
No correctness issues found.
|
AskAlexSharov
approved these changes
Oct 13, 2026
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Process-only parallel benchmarks now include residual asynchronous collection work, making comparisons inaccurate.
1 open finding
What changed in this PR
Moves ModeParallel prefix-trie construction off the execution thread using ordered, asynchronous chunks.
Changes:
- Adds double-buffered 16,384-entry collection and asynchronous trie insertion.
- Finalizes pending entries before processing and safely resets lifecycle state.
- Adds correctness tests and end-to-end benchmarks.
| File | Description |
|---|---|
execution/commitment/parallel_update.go |
Implements chunked asynchronous trie construction. |
execution/commitment/commitment.go |
Routes parallel touches through buffered collection. |
execution/commitment/parallel_patricia_hashed.go |
Builds pending entries before processing. |
execution/commitment/parallel_collect_test.go |
Tests ordering, reuse, lifetimes, and goroutine completion. |
execution/commitment/prefix_trie_test.go |
Adapts trie and lifecycle tests. |
execution/commitment/commitment_test.go |
Adapts parallel update tests. |
execution/commitment/fork_walk_test.go |
Finalizes collections before direct trie access. |
execution/commitment/touch_collect_bench_test.go |
Includes deferred build work in touch benchmarks. |
execution/commitment/parallel_streaming_bench_test.go |
Adds touch-and-process benchmarks. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…ches; drop the redundant SetMode reset
awskii
requested review from
AskAlexSharov
and
a balanced review from Copilot
October 13, 2026 08:27
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

In
ModeParallelevery touched key hit the prefix trie inline, on the execution thread. Touches now buffer into 16384-key chunks; each full chunk is inserted by its own goroutine while the next fills, in arrival order.Changes
parallelUpdate.Collecthands a full chunk to a goroutine once the previous one is inserted; two buffers alternate.ProcesscallsBuild()to wait and insert the tail.TouchHashedKeypasses the dedup string's bytes, which a pending chunk now outlives.TouchDirect/parallel/n=100000TouchAndProcess/100K/w4M5 Max,
-benchtime 5x, 6 alternating rounds, p≤0.004. B/op counts a freshUpdatesper op.