You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf: galloping search in static iterator NextGeq - #597
Replaces sort.Search (binary search over the whole remainder) with galloping
(exponential) search in the non-batched static leaf iterators — staticAsc.NextGeq and staticDesc.NextGeq (node/node_static.go).
Benchmark
BenchmarkStaticNextGeq (node/bench_test.go) drives NextGeq with monotone
targets placed step elements apart, so step is the element distance the
search must cover from the consumption edge:
dense — step 2 elements (lockstep zigzag, the typical AND/OR walk);
medium — step √N;
sparse — step N/64 (rare long skips).
Results (Apple M1 Pro, Go 1.27, -benchtime=2s, ns/match):
size
density
main (before)
this branch (after)
Δ
1 000
random
36.5
19.1
−48%
1 000
dense
12.2
9.7
−21%
1 000
medium
15.1
14.9
~0
1 000
sparse
17.1
13.5
−21%
10 000
random
55.2
31.8
−42%
10 000
dense
13.8
9.6
−31%
10 000
medium
24.4
16.0
−34%
10 000
sparse
20.6
18.9
−8%
1 000 000
random
73.4
37.9
−48%
1 000 000
dense
18.7
9.8
−48%
1 000 000
medium
53.5
21.3
−60%
1 000 000
sparse
28.6
25.7
−10%
I have read and followed all requirements in CONTRIBUTING.md;
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.10%. Comparing base (db7c170) to head (497d3c2). ⚠️ Report is 1 commits behind head on main.
Some benchmarks have degraded compared to the previous run.
Click on Show table button to see full list of degraded benchmarks.
Show table
Name
Previous
Current
Ratio
Verdict
AggDeep/size=1000000-4
db7c17
2b6409
31053.00 B/op
34683.00 B/op
1.12
🔴
And/size=1000/density=dense-4
------
2b6409
NaN B/op
112.00 B/op
NaN
🔴
NaN allocs/op
3.00 allocs/op
NaN
🔴
NaN ns/op
7621.00 ns/op
NaN
🔴
And/size=1000/density=medium-4
------
2b6409
NaN B/op
112.00 B/op
NaN
🔴
NaN allocs/op
3.00 allocs/op
NaN
🔴
NaN ns/op
992.20 ns/op
NaN
🔴
And/size=1000/density=random-4
------
2b6409
NaN B/op
112.00 B/op
NaN
🔴
NaN allocs/op
3.00 allocs/op
NaN
🔴
NaN ns/op
10010.00 ns/op
NaN
🔴
And/size=1000/density=sparse-4
------
2b6409
NaN B/op
112.00 B/op
NaN
🔴
NaN allocs/op
3.00 allocs/op
NaN
🔴
NaN ns/op
1692.00 ns/op
NaN
🔴
And/size=10000/density=dense-4
------
2b6409
NaN B/op
112.00 B/op
NaN
🔴
NaN allocs/op
3.00 allocs/op
NaN
🔴
NaN ns/op
76026.00 ns/op
NaN
🔴
And/size=10000/density=medium-4
------
2b6409
NaN B/op
112.00 B/op
NaN
🔴
NaN allocs/op
3.00 allocs/op
NaN
🔴
NaN ns/op
2991.00 ns/op
NaN
🔴
And/size=10000/density=random-4
------
2b6409
NaN B/op
112.00 B/op
NaN
🔴
NaN allocs/op
3.00 allocs/op
NaN
🔴
NaN ns/op
174288.00 ns/op
NaN
🔴
And/size=10000/density=sparse-4
------
2b6409
NaN B/op
112.00 B/op
NaN
🔴
NaN allocs/op
3.00 allocs/op
NaN
🔴
NaN ns/op
2110.00 ns/op
NaN
🔴
And/size=1000000/density=dense-4
------
2b6409
NaN B/op
112.00 B/op
NaN
🔴
NaN allocs/op
3.00 allocs/op
NaN
🔴
NaN ns/op
7588378.00 ns/op
NaN
🔴
And/size=1000000/density=medium-4
------
2b6409
NaN B/op
112.00 B/op
NaN
🔴
NaN allocs/op
3.00 allocs/op
NaN
🔴
NaN ns/op
33263.00 ns/op
NaN
🔴
And/size=1000000/density=random-4
------
2b6409
NaN B/op
112.00 B/op
NaN
🔴
NaN allocs/op
3.00 allocs/op
NaN
🔴
NaN ns/op
20615877.00 ns/op
NaN
🔴
And/size=1000000/density=sparse-4
------
2b6409
NaN B/op
112.00 B/op
NaN
🔴
NaN allocs/op
3.00 allocs/op
NaN
🔴
NaN ns/op
2664.00 ns/op
NaN
🔴
This branch has not been deployed
No deployments
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
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.
Replaces
sort.Search(binary search over the whole remainder) with galloping(exponential) search in the non-batched static leaf iterators —
staticAsc.NextGeqandstaticDesc.NextGeq(node/node_static.go).Benchmark
BenchmarkStaticNextGeq(node/bench_test.go) drives NextGeq with monotonetargets placed
stepelements apart, sostepis the element distance thesearch must cover from the consumption edge:
Results (Apple M1 Pro, Go 1.27,
-benchtime=2s, ns/match):