Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a PrefixBytes.SetNextAt that may be used when materializing the next slice in a PrefixBytes into a buffer known to contain the previous slice. SetNextAt can take advantage of the previous slice to always avoid copying the shared prefix, often avoid copying the bundle prefix and occasionally avoid copying the row suffix. ``` goos: darwin goarch: arm64 pkg: github.com/cockroachdb/pebble/sstable/colblk │ prefixbytes-old.txt │ prefixbytes-new.txt │ │ sec/op │ sec/op vs base │ PrefixBytes/alphaLen=2/iteration-10 17.735n ± 5% 7.811n ± 1% -55.96% (p=0.000 n=20) PrefixBytes/alphaLen=5/iteration-10 18.655n ± 1% 7.717n ± 1% -58.63% (p=0.000 n=20) PrefixBytes/alphaLen=26/iteration-10 18.805n ± 2% 7.600n ± 1% -59.58% (p=0.000 n=20) geomean 18.39n 7.709n -58.08% ```
- Loading branch information