Skip to content

Dispatch filter take of fixed-width values on byte width - #10736

Merged
connortsui20 merged 1 commit into
developfrom
rk/size-take-fixed-width-bytes
Oct 26, 2026
Merged

connortsui20 merged 1 commit into
developfrom
rk/size-take-fixed-width-bytes

Conversation

@robert3005

@robert3005 robert3005 commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

The filter take kernel for fixed-width values copies values and does not inspect them, but it was compiled for each of the 17 primitive and decimal value types, for each of the 8 index types. take_primitive and take_decimal now reinterpret the values buffer by its byte width, so six kernels (1, 2, 4, 8, 16 and 32 bytes) serve all value types. The reinterpretation does not copy data, and the per-element loop is the same.

before after
vortex-array release __text (macOS arm64) 14,012,988 B 13,808,764 B (-204 KB)

@robert3005 robert3005 added the changelog/chore A trivial change label Oct 23, 2026
@robert3005
robert3005 force-pushed the rk/size-take-fixed-width-bytes branch from 78921f2 to c989232 Compare October 23, 2026 17:01
@codspeed

codspeed Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 10.53%

4 warnings, 1 note

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

⚠️ Unable to measure the execution of 2 benchmarks

These benchmarks measured no execution time, so their results are not comparable and count as unchanged. This usually happens when the compiler removes the code under test.

Prevent compiler optimizations

See affected benchmarks

⚠️ 16 benchmarks are 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

⚠️ Base and head ran on different runner types

Some benchmarks with significant performance changes were compared across different runner types, so the changes might not come from the code. Run base and head on the same runner type, or use CodSpeed Macro Runners for more stable results.

Learn more about Macro Runners

Open the report in CodSpeed to investigate

ℹ️ 40 benchmarks have no flamegraph

The flamegraph wasn't generated: the symbols of the profiling trace could not be resolved, because no information about the language frames was collected.

See affected benchmarks

⚡ 3 improved benchmarks
❌ 4 regressed benchmarks
✅ 2432 untouched benchmarks
⏩ 12 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ CPU Simulation bench_compare_sliced_dict_primitive[(3333, 10000)] 32.9 µs 70.9 µs -53.52%
❌ CPU Simulation filter_powerlaw_by_random[250000] 131.3 µs 174.8 µs -24.88%
❌ CPU Simulation random_i8[0.01] 101.9 µs 115.7 µs -11.97%
❌ CPU Simulation test_scan_filter[int] 3.1 ms 3.5 ms -10.96%
⚡ CPU Simulation chunked_dict_primitive_canonical_into[f64, (1000, 1000, 10)] 203.3 µs 148.9 µs +36.55%
⚡ CPU Simulation decompress[u16, (4000, 256)] 62.5 µs 56.1 µs +11.55%
⚡ CPU Simulation chunked_canonicalize_into[(20, 100, 16, 4)] 370.2 µs 336.3 µs +10.1%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing rk/size-take-fixed-width-bytes (2f89abc) with develop (76d8371)

Open in CodSpeed

Footnotes

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

@connortsui20 connortsui20 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the speedups might be real?

@connortsui20
connortsui20 enabled auto-merge (squash) October 26, 2026 16:05
@connortsui20
connortsui20 force-pushed the rk/size-take-fixed-width-bytes branch from c989232 to ef4aa3f Compare October 26, 2026 16:05
@robert3005

Copy link
Copy Markdown
Contributor Author

they could be mostly due to different inlining

The filter take kernel copies values and does not inspect them, but it
was compiled for each of the 17 primitive and decimal value types. The
primitive and decimal paths now reinterpret the values buffer by byte
width, so six kernels (1, 2, 4, 8, 16 and 32 bytes) serve all types.
The reinterpretation does not copy data.

vortex-array release __text: 14,012,988 -> 13,808,764 bytes (-204 KB).

Signed-off-by: Robert Kruszewski <github@robertk.io>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@robert3005
robert3005 force-pushed the rk/size-take-fixed-width-bytes branch from ef4aa3f to 2f89abc Compare October 26, 2026 16:20
@connortsui20
connortsui20 merged commit 8e84e21 into develop Oct 26, 2026
79 of 81 checks passed
@connortsui20
connortsui20 deleted the rk/size-take-fixed-width-bytes branch October 26, 2026 16:29
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