Repository navigation
Conversation
Merging this PR will degrade performance by 25.64%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | new_bp_prim_test_between[i64, 2048] |
97 µs | 130.4 µs | -25.64% |
| Simulation | density_sweep_dense_runs[0.9] |
53.1 µs | < 1 ns | N/A | |
| Simulation | bench_compare_sliced_dict_primitive[(3333, 10000)] |
77.8 µs | < 1 ns | N/A |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing mk/for-kernels-take (ba18a98) with develop (c6e51ba)
Footnotes
-
518 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. ↩
Signed-off-by: Matt Katz <mhkatz97@gmail.com>
Signed-off-by: Matt Katz <mhkatz97@gmail.com>
Signed-off-by: Matt Katz <mhkatz97@gmail.com>
78aa7ad to
ba18a98
Compare
|
This PR has been marked as stale because it has been open for 14 days with no activity. Please comment or remove the stale label if you wish to keep it active, otherwise it will be closed in 7 days |
|
This PR was closed because it has been inactive for 7 days since being marked as stale. |
Part of #10159.
Summary
Take now runs as a kernel for FoR arrays with a reference per 1024-element chunk. It takes from the encoded child, then adds each value's reference, looked up from the chunk its index points into. Taken values no longer line up with chunks, so the result is a primitive array rather than a FoR array.
indices * 8 > len, the kernel declines and the array decodes before taking. This is the threshold BitPacked's take uses (UNPACK_CHUNK_THRESHOLD, nowpub(crate)), and the many-reference decode is fused.Benchmarks
Local divan benchmark, not committed: random
u32indices into 128Ki BitPackedu32values, Apple M5 Max, median.unblocked_kernel(single reference)blocked_decode(no kernel)blocked_kernel(this PR)With few indices, the kernel is ~2.2x faster than decoding and within ~10% of a single reference. At 16Ki indices (exactly
len / 8), both kernels are ~4x slower than decoding, because BitPacked's take unpacks random indices one at a time below its threshold. That affects the single-reference kernel too, so this PR leaves it alone.Checks
cargo nextest run -p vortex-fastlanes(374 passed)cargo clippy -p vortex-fastlanes --all-targets --all-features -- -D warningscargo +nightly-2026-09-10 fmt -p vortex-fastlanes