Skip to content

perf: use bin search to find TID entry#370

Merged
cheb0 merged 5 commits intomainfrom
0-bin-search-for-tid-find
Mar 18, 2026
Merged

perf: use bin search to find TID entry#370
cheb0 merged 5 commits intomainfrom
0-bin-search-for-tid-find

Conversation

@cheb0
Copy link
Member

@cheb0 cheb0 commented Mar 3, 2026

Description

For some aggs, half of time is spent just finding TID entry. Example:

_exists_:remote_addr | group by remote_addr

Total number of buckets found: 492756
Timings: 5481 ms => 2151 ms


  • I have read and followed all requirements in CONTRIBUTING.md;
  • I used LLM/AI assistance to make this pull request;

@codecov-commenter
Copy link

codecov-commenter commented Mar 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.33%. Comparing base (03b2938) to head (c310133).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #370   +/-   ##
=======================================
  Coverage   71.33%   71.33%           
=======================================
  Files         206      206           
  Lines       15140    15145    +5     
=======================================
+ Hits        10800    10804    +4     
- Misses       3553     3554    +1     
  Partials      787      787           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

🔴 Performance Degradation

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=1000-4 ad0347 ef4947
4737.00 ns/op 5572.00 ns/op 1.18 🔴
AggDeep/size=10000-4 ad0347 ef4947
47818.00 ns/op 54832.00 ns/op 1.15 🔴
AggWide/size=1000-4 ad0347 ef4947
4780.00 ns/op 5663.00 ns/op 1.18 🔴
FindSequence_Random/medium-4 ad0347 ef4947
12292.95 MB/s 10341.12 MB/s 0.84 🔴
86.31 ns/op 99.02 ns/op 1.15 🔴

@eguguchkin eguguchkin added this to the v0.69.0 milestone Mar 16, 2026
@eguguchkin eguguchkin requested review from eguguchkin and forshev and removed request for eguguchkin March 16, 2026 09:51
@cheb0 cheb0 force-pushed the 0-bin-search-for-tid-find branch from 5d4dc3a to 91bc2d7 Compare March 17, 2026 05:56
@github-actions
Copy link
Contributor

🔴 Performance Degradation

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 03387c 820f6b
4554859.00 ns/op 5906561.00 ns/op 1.30 🔴
AndTree/size=1000-4 03387c 820f6b
4.26 ns/op 5.17 ns/op 1.21 🔴
FindSequence_Random/medium-4 03387c 820f6b
11010.51 MB/s 8689.48 MB/s 0.79 🔴
93.34 ns/op 117.80 ns/op 1.26 🔴
FindSequence_Random/small-4 03387c 820f6b
6427.67 MB/s 5032.38 MB/s 0.78 🔴
40.85 ns/op 50.87 ns/op 1.25 🔴

@github-actions
Copy link
Contributor

🔴 Performance Degradation

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 03387c 282888
4554859.00 ns/op 5813434.00 ns/op 1.28 🔴
And/size=1000-4 03387c 282888
4.29 ns/op 5.21 ns/op 1.21 🔴
FindSequence_Random/medium-4 03387c 282888
11010.51 MB/s 9304.48 MB/s 0.85 🔴
93.34 ns/op 110.10 ns/op 1.18 🔴
SeqListAppend-4 03387c 282888
120.80 MB/s 109.76 MB/s 0.91 🔴

@github-actions
Copy link
Contributor

🔴 Performance Degradation

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=1000-4 822b05 013044
4697.00 ns/op 5793.00 ns/op 1.23 🔴
AggWide/size=1000000-4 822b05 013044
507.00 B/op 623.00 B/op 1.23 🔴
5295660.00 ns/op 6611902.00 ns/op 1.25 🔴
And/size=10000-4 822b05 013044
4.50 ns/op 5.02 ns/op 1.12 🔴
And/size=1000000-4 822b05 013044
4.55 ns/op 5.20 ns/op 1.14 🔴

@github-actions
Copy link
Contributor

🔴 Performance Degradation

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
FindSequence_Random/small-4 cb93e4 1f72d6
6558.79 MB/s 5442.23 MB/s 0.83 🔴

@cheb0 cheb0 enabled auto-merge (squash) March 18, 2026 07:38
@cheb0 cheb0 disabled auto-merge March 18, 2026 07:38
@github-actions
Copy link
Contributor

🔴 Performance Degradation

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
FindSequence_Random/medium-4 03b293 6fe2ba
10094.79 MB/s 9149.70 MB/s 0.91 🔴
FindSequence_Random/small-4 03b293 6fe2ba
5849.38 MB/s 4671.43 MB/s 0.80 🔴
44.19 ns/op 54.80 ns/op 1.24 🔴

@cheb0 cheb0 merged commit 7fa2c2e into main Mar 18, 2026
8 checks passed
@cheb0 cheb0 deleted the 0-bin-search-for-tid-find branch March 18, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants