bench(pco): per-element scalar reads across and within chunks - #9895
joseph-isaacs wants to merge 1 commit into
Conversation
Two divan benchmarks for `execute_scalar` on a PCO array of 16 chunks with 1024-value pages: one read in every chunk in shuffled order, and 32 reads inside a single chunk. Each read decodes the page holding its value, so both patterns cost about the same per read today; the second is the case a retained scalar probe can amortise. Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016CqrLKgPqFYGZK5sjk1qe7
Merging this PR will degrade performance by 8.55%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | random_i8[0.5] |
71.3 µs | 94.8 µs | -24.77% |
| ❌ | Simulation | decompress[u64, (4000, 1024)] |
71.5 µs | 86.8 µs | -17.63% |
| ⚡ | Simulation | random_i16[0.8] |
96.4 µs | 78.1 µs | +23.41% |
| 🆕 | Simulation | scalar_at_one_per_chunk |
N/A | 6.5 ms | N/A |
| 🆕 | Simulation | scalar_at_within_one_chunk |
N/A | 12.6 ms | 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 ji/pco-scalar-at-bench (cd4231c) with develop (b5f43ba)
Footnotes
-
218 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. ↩
Two divan benchmarks for
execute_scalaron a PCO array, to give CodSpeed a baseline for per-element PCO reads before the scalar-probe work lands.scalar_at_one_per_chunk: 16 chunks of 262 144 values with 1024-value pages, one read at a random position in every chunk, visited in shuffled order.scalar_at_within_one_chunk: 32 reads at random positions inside a single chunk.Today every read decodes the page holding its value, so both patterns cost about the same per read, roughly 16 µs locally. The second pattern is the one a retained probe can amortise, since reads share pages.
Local medians: 247 µs for the 16 cross-chunk reads, 503 µs for the 32 in-chunk reads.
Checks
cargo +nightly fmt --all -- --check: cleancargo clippy -p vortex-pco --all-targets --all-features: cleancargo bench -p vortex-pco --bench scalar_at: runs🤖 Generated with Claude Code