Skip to content

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

Merged
robert3005 merged 2 commits into
developfrom
rk/patches-piecewise-take-bench
Nov 19, 2026
Merged

robert3005 merged 2 commits into
developfrom
rk/patches-piecewise-take-bench

Conversation

@robert3005

@robert3005 robert3005 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

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

Changes

  • Adds take_piecewise to vortex-array/benches/take_patches.rs. It takes patches at density 0.1 with ascending runs of contiguous indices, covering half of a 4096-row array, for run lengths 1, 16 and 256.
  • Inputs go through mark_optimized, like the existing benchmarks in this file.

@codspeed

codspeed Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Merging this PR will improve performance by 10.73%

1 warning

⚠️ 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 improved benchmark
✅ 1974 untouched benchmarks
🆕 3 new benchmarks
⏩ 53 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
⚡ Walltime decode_blocked_bitpacked_chunked_neon[u32, 524288] 30.1 µs 27.2 µs +10.73%
🆕 CPU Simulation take_piecewise[1] N/A 395.2 µs N/A
🆕 CPU Simulation take_piecewise[16] N/A 150.9 µs N/A
🆕 CPU Simulation take_piecewise[256] N/A 173.6 µ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 (2245055) with develop (a0cb3c6)

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

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.

Counts the 12 new benchmarks in scripts/codspeed_bench_counts.json for
the CodSpeed shard planner.

Signed-off-by: Robert Kruszewski <github@robertk.io>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gz5XNZn5EvWEDxkeJkJAFe
@robert3005
robert3005 force-pushed the rk/patches-piecewise-take-bench branch from f9667e5 to 583e8a0 Compare November 18, 2026 09:22
Keep only take_piecewise at patch density 0.1 with run lengths 1, 16 and
256. CodSpeed compares each benchmark against its base, so the
materialized variant and the second density added little.

Signed-off-by: Robert Kruszewski <github@robertk.io>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gz5XNZn5EvWEDxkeJkJAFe
@robert3005
robert3005 enabled auto-merge (squash) November 18, 2026 15:22
@robert3005
robert3005 merged commit 95aeec2 into develop Nov 19, 2026
83 checks passed
@robert3005
robert3005 deleted the rk/patches-piecewise-take-bench branch November 19, 2026 12:07
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