Repository navigation
beatree: reconstruct branch separator keys as four shifted words - #994
Draft
citizen-stig wants to merge 1 commit into
Draft
citizen-stig wants to merge 1 commit into
citizen-stig wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What
bit_ops::reconstruct_keybuilds the key as fouru64words. It shifts the separator past the prefix and ORs in the masked prefix, instead ofbitwise_memcpyplus byte-wise masking. A new test compares it with the reference implementation for every prefix length (0–256), separator bit offset (0–7) and separator length.Benchmarks
finishon masterfinishon master + #979 + #987No measurable gain at either base. With #991, #992 and #993 on master, the four give −7.1%.
finish_bench: an isolatedSession::finishbenchmark with the user-namespace access profile of a Sovereign SDK node (benchtop/src/bin/finish_bench.rs@ 3469d5c, not part of this PR). 50k–145kReadThenWriteaccesses per slot (68% updates with the prior value, 32% inserts), 36-byte values,BinaryHasher<Sha256>, rollback on, tree growing from 5.35M leaves, 10 warm-up + 20 measured slots from a restored seed DB.commit_concurrency8 on all 16 CPUs of an AMD Ryzen 7 7700 (8 cores). Mean of 8 runs. Master is6ee36d3. This PR, the three other small-commit PRs, and the same four on master + #979 + #987 were measured in one batch, with order rotated each round. Every run ends at the same root. Linuxcargo test --workspaceandcargo test -p nomt-core --features borsh,serdepass on this branch.🤖 Generated with Claude Code