-
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.
colblk: add PrefixBytesIter for stateful key synthesis
Replace PrefixBytes.{AppendAt,SetNextAt} with a new PrefixBytes.{SetAt,SetNext} API that uses a PrefixBytesIter type to hold the key buffer and metadata that can be used to more cheaply perform SetNext operations. Subsequent work will also extend the API to support a SetPrev method. ``` goos: darwin goarch: arm64 pkg: github.com/cockroachdb/pebble/sstable/colblk │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ PrefixBytes/alphaLen=2/iteration-10 7.799n ± 4% 5.600n ± 1% -28.20% (p=0.000 n=20) PrefixBytes/alphaLen=5/iteration-10 7.741n ± 1% 5.590n ± 1% -27.78% (p=0.000 n=20) PrefixBytes/alphaLen=26/iteration-10 7.655n ± 0% 5.616n ± 1% -26.63% (p=0.000 n=20) geomean 7.732n 5.602n -27.54% ```
- Loading branch information
Showing
4 changed files
with
158 additions
and
53 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