-
Notifications
You must be signed in to change notification settings - Fork 452
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sstable: perf improvement for ResetForReuse
Resetting iterators takes a non-trivial amount of time (15% in the RandSeekInSST benchmark). Most of it is because we're copying fairly large structures by value. We change `ResetForReuse` to reset the iterator in-place, and we use an unsafe trick to clear out only a section of `singleLevelIterator`. Benchmark (baseline includes a few other in-flight PRs): ``` name old time/op new time/op delta RandSeekInSST/v4/single-level-10 1.15µs ± 0% 1.02µs ± 1% -10.84% (p=0.001 n=7+7) RandSeekInSST/v4/two-level-10 1.99µs ± 2% 1.71µs ± 2% -13.85% (p=0.000 n=8+8) RandSeekInSST/v5/single-level-10 944ns ± 1% 823ns ± 1% -12.86% (p=0.000 n=8+8) RandSeekInSST/v5/two-level-10 1.44µs ± 1% 1.24µs ± 7% -13.79% (p=0.000 n=7+8) ```
- Loading branch information
1 parent
29cc16b
commit ca88b3b
Showing
9 changed files
with
57 additions
and
50 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
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
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