Skip to content

bench(pco): per-element scalar reads across and within chunks - #9895

Draft
joseph-isaacs wants to merge 1 commit into
developfrom
ji/pco-scalar-at-bench
Draft

joseph-isaacs wants to merge 1 commit into
developfrom
ji/pco-scalar-at-bench

Conversation

@joseph-isaacs

Copy link
Copy Markdown
Contributor

Two divan benchmarks for execute_scalar on 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: clean
  • cargo clippy -p vortex-pco --all-targets --all-features: clean
  • cargo bench -p vortex-pco --bench scalar_at: runs

🤖 Generated with Claude Code

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
@joseph-isaacs joseph-isaacs added the changelog/chore A trivial change label Sep 15, 2026
@codspeed

codspeed Bot commented Sep 15, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 8.55%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
❌ 2 regressed benchmarks
✅ 2195 untouched benchmarks
🆕 2 new benchmarks
⏩ 218 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

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)

Open in CodSpeed

Footnotes

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

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