recsplit: optimize findSplit and findBijection#19043
Merged
Merged
Conversation
c7e6194 to
7041cef
Compare
Contributor
|
great work big Alex! |
Giulio2002
approved these changes
Feb 9, 2026
sudeepdino008
pushed a commit
that referenced
this pull request
Feb 10, 2026
4-unrolling:
```
benchstat old.txt new.txt
goos: linux
goarch: amd64
pkg: github.com/erigontech/erigon/db/recsplit
cpu: AMD EPYC 4344P 8-Core Processor
│ old.txt │ new.txt │
│ sec/op │ sec/op vs base │
FindSplit-16 13.32m ± 1% 11.51m ± 1% -13.64% (p=0.000 n=10)
FindBijection-16 6.167m ± 0% 5.531m ± 0% -10.31% (p=0.000 n=10)
Build-16 1.971 ± 0% 1.780 ± 0% -9.72% (p=0.000 n=10)
AddKeyAndBuild/noEnums-16 2.357 ± 27% 2.147 ± 1% -8.90% (p=0.000 n=10)
AddKeyAndBuild/enums-16 2.441 ± 11% 2.229 ± 2% -8.67% (p=0.000 n=10)
```
8-unrolling:
```
goos: linux
goarch: amd64
pkg: github.com/erigontech/erigon/db/recsplit
cpu: AMD EPYC 4344P 8-Core Processor
│ old.txt │ new.txt │
│ sec/op │ sec/op vs base │
FindSplit-16 13.32m ± 1% 10.52m ± 0% -21.00% (p=0.000 n=10)
FindBijection-16 6.167m ± 0% 4.799m ± 1% -22.18% (p=0.000 n=10)
Build-16 1.971 ± 0% 1.617 ± 1% -17.96% (p=0.000 n=10)
AddKeyAndBuild/noEnums-16 2.357 ± 27% 1.989 ± 1% -15.59% (p=0.000 n=10)
AddKeyAndBuild/enums-16 2.441 ± 11% 2.067 ± 6% -15.32% (p=0.000 n=10)
```
based on #19041
Sahil-4555
pushed a commit
to Sahil-4555/erigon
that referenced
this pull request
Feb 11, 2026
4-unrolling:
```
benchstat old.txt new.txt
goos: linux
goarch: amd64
pkg: github.com/erigontech/erigon/db/recsplit
cpu: AMD EPYC 4344P 8-Core Processor
│ old.txt │ new.txt │
│ sec/op │ sec/op vs base │
FindSplit-16 13.32m ± 1% 11.51m ± 1% -13.64% (p=0.000 n=10)
FindBijection-16 6.167m ± 0% 5.531m ± 0% -10.31% (p=0.000 n=10)
Build-16 1.971 ± 0% 1.780 ± 0% -9.72% (p=0.000 n=10)
AddKeyAndBuild/noEnums-16 2.357 ± 27% 2.147 ± 1% -8.90% (p=0.000 n=10)
AddKeyAndBuild/enums-16 2.441 ± 11% 2.229 ± 2% -8.67% (p=0.000 n=10)
```
8-unrolling:
```
goos: linux
goarch: amd64
pkg: github.com/erigontech/erigon/db/recsplit
cpu: AMD EPYC 4344P 8-Core Processor
│ old.txt │ new.txt │
│ sec/op │ sec/op vs base │
FindSplit-16 13.32m ± 1% 10.52m ± 0% -21.00% (p=0.000 n=10)
FindBijection-16 6.167m ± 0% 4.799m ± 1% -22.18% (p=0.000 n=10)
Build-16 1.971 ± 0% 1.617 ± 1% -17.96% (p=0.000 n=10)
AddKeyAndBuild/noEnums-16 2.357 ± 27% 1.989 ± 1% -15.59% (p=0.000 n=10)
AddKeyAndBuild/enums-16 2.441 ± 11% 2.067 ± 6% -15.32% (p=0.000 n=10)
```
based on erigontech#19041
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
4-unrolling:
8-unrolling:
based on #19041