-
Notifications
You must be signed in to change notification settings - Fork 472
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
db: optimize SeekGE/SeekLT for the noop case
This is especially useful for sparse parts of the key space which may have large numbers of deleted versions, as happens with the locks in CockroachDB. Results from a CockroachDB benchmark are included below. The separated=true case is what mainly benefits from this. The actual new numbers are listed after the diff. name old time/op new time/op delta ScanAllIntentDeleted/separated=false/versions=200/percent-flushed=0-16 63.8µs ± 0% 50.2µs ± 0% -21.27% ScanAllIntentDeleted/separated=false/versions=200/percent-flushed=50-16 24.4µs ± 0% 24.8µs ± 0% +1.81% ScanAllIntentDeleted/separated=false/versions=200/percent-flushed=90-16 5.60µs ± 0% 4.28µs ± 0% -23.68% ScanAllIntentDeleted/separated=false/versions=200/percent-flushed=100-16 1.59µs ± 0% 1.07µs ± 0% -33.04% ScanAllIntentDeleted/separated=true/versions=200/percent-flushed=0-16 51.7ms ± 0% 0.0ms ± 0% -99.99% ScanAllIntentDeleted/separated=true/versions=200/percent-flushed=50-16 14.7ms ± 0% 0.0ms ± 0% -99.99% ScanAllIntentDeleted/separated=true/versions=200/percent-flushed=90-16 1.04ms ± 0% 0.00ms ± 0% -99.85% BenchmarkScanAllIntentDeleted/separated=false/versions=200/percent-flushed=0-16 23816 50222 ns/op 0 B/op 0 allocs/op BenchmarkScanAllIntentDeleted/separated=false/versions=200/percent-flushed=50-16 46825 24840 ns/op 0 B/op 0 allocs/op BenchmarkScanAllIntentDeleted/separated=false/versions=200/percent-flushed=90-16 304212 4277 ns/op 0 B/op 0 allocs/op BenchmarkScanAllIntentDeleted/separated=false/versions=200/percent-flushed=100-16 1342129 1066 ns/op 0 B/op 0 allocs/op BenchmarkScanAllIntentDeleted/separated=true/versions=200/percent-flushed=0-16 197700 5267 ns/op 0 B/op 0 allocs/op BenchmarkScanAllIntentDeleted/separated=true/versions=200/percent-flushed=50-16 673788 1696 ns/op 0 B/op 0 allocs/op BenchmarkScanAllIntentDeleted/separated=true/versions=200/percent-flushed=90-16 798824 1530 ns/op 0 B/op 0 allocs/op BenchmarkScanAllIntentDeleted/separated=true/versions=200/percent-flushed=100-16 1256680 1027 ns/op 0 B/op 0 allocs/op
- Loading branch information
1 parent
444296c
commit 959663f
Showing
1 changed file
with
91 additions
and
45 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