forked from cockroachdb/pebble
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This optimization is used when the seek would position at the current block of the iterator. It relies on having bounds set on the iteraor since that is we can claim certain invariants on the current iterator position. Ascending or descending bounds is how CockroachDB executes batched scans, and the SeqSeekGEWithBounds microbenchmarks, that show significant improvement, imitate this pattern. name old time/op new time/op delta MergingIterSeekGE/restart=16/count=1-16 841ns ± 5% 806ns ± 3% -4.12% (p=0.014 n=8+10) MergingIterSeekGE/restart=16/count=2-16 1.78µs ± 9% 1.67µs ± 4% -6.21% (p=0.001 n=9+10) MergingIterSeekGE/restart=16/count=3-16 2.60µs ±19% 2.46µs ± 2% ~ (p=0.529 n=10+10) MergingIterSeekGE/restart=16/count=4-16 3.44µs ±10% 3.34µs ± 4% ~ (p=0.123 n=10+10) MergingIterSeekGE/restart=16/count=5-16 4.35µs ± 5% 4.35µs ± 4% ~ (p=0.825 n=10+9) MergingIterNext/restart=16/count=1-16 37.7ns ± 4% 37.2ns ± 1% -1.29% (p=0.008 n=9+10) MergingIterNext/restart=16/count=2-16 60.7ns ± 6% 59.6ns ± 1% ~ (p=0.209 n=10+10) MergingIterNext/restart=16/count=3-16 77.4ns ± 3% 75.8ns ± 1% -2.10% (p=0.036 n=10+9) MergingIterNext/restart=16/count=4-16 86.9ns ± 2% 87.7ns ± 1% +0.91% (p=0.007 n=9+10) MergingIterNext/restart=16/count=5-16 104ns ± 2% 103ns ± 2% ~ (p=0.907 n=10+9) MergingIterPrev/restart=16/count=1-16 52.2ns ± 3% 51.6ns ± 2% ~ (p=0.118 n=10+10) MergingIterPrev/restart=16/count=2-16 76.5ns ± 2% 75.8ns ± 2% ~ (p=0.130 n=9+9) MergingIterPrev/restart=16/count=3-16 94.3ns ± 2% 92.2ns ± 2% -2.22% (p=0.001 n=10+10) MergingIterPrev/restart=16/count=4-16 103ns ± 1% 102ns ± 2% -0.87% (p=0.038 n=10+10) MergingIterPrev/restart=16/count=5-16 118ns ± 2% 117ns ± 1% ~ (p=0.085 n=10+8) MergingIterSeqSeekGEWithBounds/levelCount=5-16 3.64µs ± 7% 0.73µs ± 2% -79.86% (p=0.000 n=10+10) name old time/op new time/op delta LevelIterSeekGE/restart=16/count=5-16 1.23µs ± 4% 1.23µs ± 3% ~ (p=0.765 n=10+9) LevelIterSeqSeekGEWithBounds/restart=16/count=5-16 862ns ± 8% 147ns ± 3% -82.93% (p=0.000 n=10+10) LevelIterNext/restart=16/count=5-16 18.7ns ± 4% 18.5ns ± 4% ~ (p=0.386 n=10+9) LevelIterPrev/restart=16/count=5-16 31.4ns ± 8% 32.5ns ± 7% ~ (p=0.055 n=10+10)
- Loading branch information
1 parent
76afcca
commit a24bc6c
Showing
5 changed files
with
353 additions
and
61 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.