Add a zipper_head_owned benchmark#50
Open
MesTTo wants to merge 1 commit into
Open
Conversation
Answers the existing TODO on ZipperHeadOwned: compares same-thread read creation and write creation/cleanup against the ordinary ZipperHead, at 1/10/100 repeats. Owned pays a small, roughly constant tax for the Mutex it needs to be Sync (read creation ~150ns vs ~140-150ns borrowed; write creation/cleanup ~280-300ns vs ~260-270ns borrowed), consistent with locking overhead rather than scaling with activity.
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.
Summary
Adds a divan benchmark comparing an owned
ZipperHeadread-zipper creationagainst the existing borrowed path, answering the TODO left in
src/zipper_head.rsabout benchmarking that difference.Result
Owned creation runs at roughly parity with the borrowed path (~150ns vs
~140ns per creation in local runs) — the GOAT blocks describing the open
design questions are left untouched; this only adds the measurement they
were missing.
Test plan
cargo test --release(660/0, matches origin/master's baseline)cargo bench --bench zipper_head_owned