Repository navigation
bench(patches): add baseline for piecewise take - #11546
Merged
Merged
Conversation
Merging this PR will improve performance by 10.73%1 warning
Performance Changes
Tip Curious why performance improved? Comment Comparing Footnotes
|
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
force-pushed
the
rk/patches-piecewise-take-bench
branch
from
November 18, 2026 09:22
f9667e5 to
583e8a0
Compare
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
enabled auto-merge (squash)
November 18, 2026 15:22
0ax1
approved these changes
Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Baseline benchmarks for taking
PatcheswithPiecewiseSequenceArrayindices, 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
take_piecewisetovortex-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.mark_optimized, like the existing benchmarks in this file.