Skip to content

Cache min/max indices in patches#7753

Open
palaska wants to merge 2 commits intodevelopfrom
bp/minmax-index
Open

Cache min/max indices in patches#7753
palaska wants to merge 2 commits intodevelopfrom
bp/minmax-index

Conversation

@palaska
Copy link
Copy Markdown
Contributor

@palaska palaska commented May 1, 2026

Cache min/max patch indices in Patches and short-circuit search_index when the query falls outside that range. Speeds up ALP/BitPacked scalar_at. This should help with slicing any patched array into a region that doesn't overlap the patch range

Screenshot 2026-05-01 at 16 26 04

Signed-off-by: Baris Palaska <barispalaska@gmail.com>
@palaska palaska 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 24.88%

⚠️ 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.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
❌ 1 regressed benchmark
✅ 1167 untouched benchmarks
🆕 6 new benchmarks
⏩ 138 skipped benchmarks1

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

Performance Changes

Mode Benchmark BASE HEAD Efficiency
🆕 Simulation search_index_above_max N/A 28.8 µs N/A
🆕 Simulation get_patched_above_max N/A 44.1 µs N/A
🆕 Simulation search_index_full_range_random N/A 270.2 µs N/A
🆕 Simulation search_index_in_range N/A 265 µs N/A
🆕 Simulation search_index_mixed_out_of_range N/A 26.3 µs N/A
🆕 Simulation search_index_below_min N/A 23.6 µs N/A
Simulation new_bp_prim_test_between[i64, 32768] 177.3 µs 236 µs -24.88%
Simulation bitwise_not_vortex_buffer_mut[128] 275.3 ns 246.1 ns +11.85%

Comparing bp/minmax-index (705b9a5) with develop (5e5572b)

Open in CodSpeed

Footnotes

  1. 138 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Signed-off-by: Baris Palaska <barispalaska@gmail.com>
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