Skip to content

bench(pco): scalar access baseline for CodSpeed - #9896

Merged
joseph-isaacs merged 3 commits into
developfrom
ji/pco-scalar-bench
Sep 15, 2026
Merged

joseph-isaacs merged 3 commits into
developfrom
ji/pco-scalar-bench

Conversation

@joseph-isaacs

Copy link
Copy Markdown
Contributor

One divan benchmark, scalar_access, reading scalars out of a PCO array through execute_scalar, to give CodSpeed a baseline before the scalar-probe work lands. The probe PR will switch the repeated cases to repeated_probe() under the same bench names so the comparison shows up on merge.

Fixture: 16 384 u32 rows with values row / 16, PCO level 8, 1024 values per page. Nullable cases null every 11th row. Indices come from a fixed-seed LCG, clustered within 256 rows starting at row 4096 (one page) or scattered over the whole array.

Cases are (access_count, nullable, scattered):

Case Local median
(1, false, false) 6.2 µs
(1024, false, false) 5.70 ms
(1024, true, false) 4.25 ms
(1024, false, true) 5.61 ms

Today every read decodes its page, so clustered and scattered cost the same. The single-read case is the control for the one-off path, which the probe work does not change.

Overlaps with #9895, which covers the same ground with cross-chunk and in-chunk cases; only one of the two should merge.

Checks

  • cargo bench -p vortex-pco --bench scalar: builds and runs
  • clippy and fmt not run locally

🤖 Generated with Claude Code

joseph-isaacs and others added 2 commits September 15, 2026 21:07
Four cases of scalar reads out of a PCO array: a single read, and 1,024 clustered,
nullable clustered, and scattered reads. Establishes a CodSpeed baseline so the
probe work in encodings/pco can show its effect on merge.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
@joseph-isaacs
joseph-isaacs enabled auto-merge (squash) September 15, 2026 20:16
@codspeed

codspeed Bot commented Sep 15, 2026

Copy link
Copy Markdown

Merging this PR will regress 2 benchmarks

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

⚡ 4 improved benchmarks
❌ 2 regressed benchmarks
✅ 2192 untouched benchmarks
🆕 4 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.9 µs -24.81%
Simulation new_raw_prim_test_between[i32, 2048] 64.1 µs 77.9 µs -17.66%
Simulation execute_scalar_struct_wide 503 µs 389.6 µs +29.12%
Simulation random_i16[0.8] 96.4 µs 78.5 µs +22.83%
Simulation execute_scalar_struct_simple 106.5 µs 89.4 µs +19.02%
Simulation allocate_drop_arrow[0] 456.9 ns 402.7 ns +13.45%
🆕 Simulation scalar_access[(1, false, false)] N/A 208.8 µs N/A
🆕 Simulation scalar_access[(1024, false, false)] N/A 132.3 ms N/A
🆕 Simulation scalar_access[(1024, false, true)] N/A 133.3 ms N/A
🆕 Simulation scalar_access[(1024, true, false)] N/A 100.7 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-bench (7403cf4) with develop (b5f43ba)2

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.

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

@joseph-isaacs joseph-isaacs added the changelog/chore A trivial change label Sep 15, 2026
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
@joseph-isaacs
joseph-isaacs merged commit 5c8cac4 into develop Sep 15, 2026
80 of 81 checks passed
@joseph-isaacs
joseph-isaacs deleted the ji/pco-scalar-bench branch September 15, 2026 21:31
joseph-isaacs added a commit that referenced this pull request Sep 15, 2026
Drops the probe bench added by this PR; the scalar bench from #9896 is
the baseline, and reading it through one `RepeatedArrayProbe` shows the
retained page decode on the clustered cases.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CqrLKgPqFYGZK5sjk1qe7
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
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