Skip to content

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

Open
robert3005 wants to merge 1 commit into
developfrom
rk/size-take-fixed-width-bytes
Open

robert3005 wants to merge 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
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 <robert@spiraldb.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@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 regress 2 benchmarks

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 1 benchmark

This benchmark measured no execution time, so its result is not comparable and counts as unchanged. This usually happens when the compiler removes the code under test.

Prevent compiler optimizations

See affected benchmarks

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

⚡ 15 improved benchmarks
❌ 2 regressed benchmarks
✅ 2391 untouched benchmarks
⏩ 12 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Walltime starts_with_avx512[8, VarBin] 39.6 µs 45.4 µs -12.86%
❌ Walltime threshold_avx512[80] 2.4 µs 2.7 µs -10.61%
⚡ CPU Simulation test_scan_filter_to_arrow_array[int_float] 4.1 ms 3.5 ms +15.88%
⚡ CPU Simulation filter_powerlaw_by_mostly_false[250000] 158.2 µs 136.8 µs +15.68%
⚡ CPU Simulation density_sweep_dense_runs[0.001] 61.3 µs 53.4 µs +14.82%
⚡ CPU Simulation filter_random_by_mostly_false[250000] 183.9 µs 162.4 µs +13.23%
⚡ CPU Simulation test_repeated_scan_filter[int_float] 3.9 ms 3.4 ms +12.28%
⚡ CPU Simulation filter_random_by_power_law[250000] 185.3 µs 165.4 µs +12.03%
⚡ CPU Simulation filter_powerlaw_by_power_law[250000] 185.3 µs 165.6 µs +11.87%
⚡ CPU Simulation random_i128[0.01] 5.8 µs 5.2 µs +11.82%
⚡ CPU Simulation test_repeated_scan_filter[int] 2.7 ms 2.5 ms +11.01%
⚡ CPU Simulation test_scan_filter_to_arrow_array[int] 2.8 ms 2.5 ms +10.94%
⚡ CPU Simulation filter_random_by_mostly_false[100000] 88.4 µs 79.9 µs +10.62%
⚡ CPU Simulation density_sweep_random[0.1] 88.3 µs 79.9 µs +10.51%
⚡ CPU Simulation density_sweep_dense_runs[0.9] 65.7 µs 59.5 µs +10.34%
⚡ CPU Simulation filter_powerlaw_by_mostly_false[100000] 88.2 µs 79.9 µs +10.31%
⚡ CPU Simulation filter_random_by_random[250000] 201.1 µs 182.8 µs +10.01%

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 (c989232) with develop (8c680f2)2

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

  2. No successful run was found on develop (c88edde) during the generation of this report, so 8c680f2 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

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.

1 participant