Skip to content

Improve intersect_by_rank performance#7744

Draft
robert3005 wants to merge 4 commits intodevelopfrom
rk/intersect-by-rank
Draft

Improve intersect_by_rank performance#7744
robert3005 wants to merge 4 commits intodevelopfrom
rk/intersect-by-rank

Conversation

@robert3005
Copy link
Copy Markdown
Contributor

We never spent time and this is useful for merging selections and filters in
scans

Signed-off-by: Robert Kruszewski github@robertk.io

@robert3005
Copy link
Copy Markdown
Contributor Author

I will go over this tomorrow @joseph-isaacs I looked at #7098 and #7393 which both optimised slightly different cases of this function. I tried to combine the two.

@robert3005 robert3005 added the changelog/performance A performance improvement label May 1, 2026
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 1, 2026

Merging this PR will degrade performance by 23.82%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚡ 24 improved benchmarks
❌ 24 regressed benchmarks
✅ 1158 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation take_search[(0.005, 0.05)] 131.4 µs 168 µs -21.8%
Simulation take_search[(0.005, 0.1)] 247.1 µs 320.1 µs -22.82%
Simulation take_search[(0.005, 0.5)] 1.2 ms 1.5 ms -23.69%
Simulation take_search[(0.005, 1.0)] 2.3 ms 3.1 ms -23.82%
Simulation take_search[(0.01, 0.05)] 142.5 µs 179.1 µs -20.45%
Simulation take_search[(0.01, 0.1)] 267.9 µs 341 µs -21.42%
Simulation take_search[(0.01, 0.5)] 1.3 ms 1.6 ms -22.23%
Simulation take_search[(0.01, 1.0)] 2.5 ms 3.3 ms -22.35%
Simulation take_search[(0.1, 0.05)] 212.4 µs 249.1 µs -14.72%
Simulation take_search[(0.1, 0.1)] 386.2 µs 459.3 µs -15.91%
Simulation take_search[(0.1, 0.5)] 1.8 ms 2.2 ms -16.95%
Simulation take_search[(0.1, 1.0)] 3.5 ms 4.3 ms -17.1%
Simulation take_search_chunked[(0.005, 0.05)] 162.1 µs 193.3 µs -16.14%
Simulation take_search_chunked[(0.005, 0.1)] 307 µs 369.1 µs -16.83%
Simulation take_search_chunked[(0.005, 0.5)] 1.5 ms 1.8 ms -17.4%
Simulation take_search_chunked[(0.005, 1.0)] 2.9 ms 3.5 ms -17.49%
Simulation take_search_chunked[(0.01, 0.05)] 174.6 µs 205.8 µs -15.15%
Simulation take_search_chunked[(0.01, 0.1)] 331.8 µs 393.9 µs -15.77%
Simulation take_search_chunked[(0.01, 0.5)] 1.6 ms 1.9 ms -16.31%
Simulation take_search_chunked[(0.01, 1.0)] 3.2 ms 3.8 ms -16.39%
... ... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.


Comparing rk/intersect-by-rank (ea3104a) with develop (8e0b58c)

Open in CodSpeed

@robert3005 robert3005 force-pushed the rk/intersect-by-rank branch 6 times, most recently from a8488fc to 5391af2 Compare May 7, 2026 23:32
robert3005 added 4 commits May 8, 2026 11:11
Signed-off-by: Robert Kruszewski <github@robertk.io>
Signed-off-by: Robert Kruszewski <github@robertk.io>
Signed-off-by: Robert Kruszewski <github@robertk.io>
Signed-off-by: Robert Kruszewski <github@robertk.io>
@robert3005 robert3005 force-pushed the rk/intersect-by-rank branch from 3083876 to ea3104a Compare May 8, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/performance A performance improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant