Skip to content

bench(patches): add baseline for piecewise take - #11546

Open
robert3005 wants to merge 1 commit into
developfrom
rk/patches-piecewise-take-bench
Open

robert3005 wants to merge 1 commit into
developfrom
rk/patches-piecewise-take-bench

Conversation

@robert3005

Copy link
Copy Markdown
Contributor

Summary

Baseline benchmarks for taking Patches with PiecewiseSequenceArray indices, ahead of the stacked follow-up that takes the runs without expanding them. Landing the benchmarks first gives that change a recorded baseline to compare against.

Changes

Adds two benchmarks to vortex-array/benches/take_patches.rs, over patch densities 0.1 and 0.01 and run lengths 1, 16 and 256. The indices are ascending runs of contiguous positions covering half of a 4096-row array.

  • take_piecewise calls Patches::take with the PiecewiseSequenceArray directly.
  • take_piecewise_materialized expands the same indices to a PrimitiveArray first.

Patches::take currently materializes piecewise indices itself, so on develop the two measure the same: about 8–33 µs per take, depending on density and run length.

Inputs go through mark_optimized, like the existing benchmarks in this file.

Checks run: cargo clippy -p vortex-array --bench take_patches -- -D warnings, cargo +nightly-2026-11-13 fmt -p vortex-array, and the benchmark itself.


Generated by Claude Code

Adds take_piecewise benchmarks that take Patches with ascending
PiecewiseSequenceArray runs, next to take_piecewise_materialized, which
expands the same indices to a primitive array first. Patches::take
currently materializes piecewise indices itself, so the two match; the
follow-up optimisation takes the runs without expanding them.

Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gz5XNZn5EvWEDxkeJkJAFe
@codspeed

codspeed Bot commented Nov 17, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 10.48%

2 warnings

⚠️ Walltime results may be unreliable

Some benchmarks used the Walltime instrument outside CodSpeed Macro Runners, which can make the results inconsistent.

Learn more about Macro Runners

See affected benchmarks

⚠️ 1 benchmark is dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

⚡ 1 improved benchmark
✅ 1964 untouched benchmarks
🆕 12 new benchmarks
⏩ 53 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
⚡ Walltime decode_blocked_bitpacked_chunked_neon[u32, 524288] 29.7 µs 26.9 µs +10.48%
🆕 CPU Simulation take_piecewise_materialized[(0.01, 1)] N/A 341.6 µs N/A
🆕 CPU Simulation take_piecewise_materialized[(0.01, 16)] N/A 128.2 µs N/A
🆕 CPU Simulation take_piecewise_materialized[(0.01, 256)] N/A 126.4 µs N/A
🆕 CPU Simulation take_piecewise_materialized[(0.1, 1)] N/A 398.4 µs N/A
🆕 CPU Simulation take_piecewise_materialized[(0.1, 16)] N/A 154.6 µs N/A
🆕 CPU Simulation take_piecewise_materialized[(0.1, 256)] N/A 148.4 µs N/A
🆕 CPU Simulation take_piecewise[(0.01, 1)] N/A 341.3 µs N/A
🆕 CPU Simulation take_piecewise[(0.01, 16)] N/A 128.2 µs N/A
🆕 CPU Simulation take_piecewise[(0.01, 256)] N/A 126.5 µs N/A
🆕 CPU Simulation take_piecewise[(0.1, 1)] N/A 388.4 µs N/A
🆕 CPU Simulation take_piecewise[(0.1, 16)] N/A 153.1 µs N/A
🆕 CPU Simulation take_piecewise[(0.1, 256)] N/A 172.7 µs N/A

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing rk/patches-piecewise-take-bench (f9667e5) with develop (bbb5e26)

Open in CodSpeed

Footnotes

  1. 53 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. ↩

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/chore A trivial change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants