Skip to content

test(bench): measure ours with and without the raw skip - #644

Merged
polaz merged 1 commit into
mainfrom
test/#643-bench-raw-skip
Nov 9, 2026
Merged

polaz merged 1 commit into
mainfrom
test/#643-bench-raw-skip

Conversation

@polaz

@polaz polaz commented Nov 9, 2026

Copy link
Copy Markdown
Member

Summary

  • The benchmark matrix measures two configurations of our encoder in every cell, against the same libzstd reference: searched (the raw skip off, every block searched as libzstd searches it) and raw_skip (the library default).
  • The dashboard switches every chart between them with one checkbox; the default is searched.

Changes

  • compare_ffi: a criterion arm, a paired measurement and a size report per configuration in the compress and compress-dict groups; a decompress source per configuration whose frames differ (rust_raw_skip_stream). Where both write byte-identical frames, the size and the decode are reported once under any (REPORT_SAME_FRAMES marks the decode).
  • compare_ffi_memory: compress and decompress peaks per configuration, collapsed to any where they agree.
  • RAW_SKIP=0 / RAW_SKIP=1 restrict a local run to one configuration; unset runs both.
  • run-benchmarks.sh files every row under rust_variant; the level aggregation and the gh-pages merge keep the configurations as separate records under the same series key, and the record cap grows to hold as many snapshots as before.
  • Dashboard: the raw-skip checkbox filters the records behind all three charts; records written before this carry no variant and measured the raw skip on, so they show under it.
  • BENCHMARKS.md documents both configurations.

Testing

Clippy and formatting pass on the bench crate. A local two-round run of run-benchmarks.sh on two levels with both bench binaries parsed end to end into the delta, report and relative outputs; the dashboard, loaded with that run on top of the published payload, switches between the two configurations. The bench matrix itself runs on push to main.

Closes #643

- compare_ffi measures two configurations of our encoder in every cell
  against the same libzstd reference: searched (the raw skip off, every
  block searched as libzstd searches it) and raw_skip (the library
  default); each gets its own criterion arm, paired measurement and size
  report
- where both write byte-identical frames, the size and the decode are
  reported once under `any`, so a cell is not measured or stored twice
- compare_ffi_memory reports both peaks the same way
- RAW_SKIP=0 / RAW_SKIP=1 restrict a local run to one configuration;
  unset runs both
- the CI parser, the level aggregation and the gh-pages merge keep the
  configurations as separate records under the same series key; the
  record cap grows to hold as many snapshots as before
- the dashboard switches every chart between the two with one checkbox,
  searched by default; snapshots recorded before measured the raw skip
  on and show under it

Closes #643
@coderabbitai

coderabbitai Bot commented Nov 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 30 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 9cfd02b and daa20d9.

Files selected for processing: 8

  • .github/bench-dashboard/index.html
  • .github/scripts/aggregate-bench-levels.py
  • .github/scripts/merge-benchmarks.py
  • .github/scripts/run-benchmarks.sh
  • BENCHMARKS.md
  • zstd/benches/compare_ffi.rs
  • zstd/benches/compare_ffi_memory.rs
  • zstd/benches/support/mod.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T00:13:06.679620Z daa20d9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codecov

codecov Bot commented Nov 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@polaz
polaz merged commit 4ed3332 into main Nov 9, 2026
35 checks passed
@polaz
polaz deleted the test/#643-bench-raw-skip branch November 9, 2026 00:47
@sw-release-bot sw-release-bot Bot mentioned this pull request Nov 9, 2026
polaz pushed a commit that referenced this pull request Nov 14, 2026
## 🤖 New release

* `structured-zstd`: 0.3.0 -> 0.4.0

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[0.4.0](v0.3.0...v0.4.0)
- 2026-11-14

### Added

- *(decoding)* [**breaking**] hold dictionary content in the caller's
buffer
([#649](#649))
- *(encode)* let the caller choose how a frame uses a dictionary
([#641](#641))

### Fixed

- *(c-api)* refuse a decompression bound the result cannot carry
([#668](#668))

### Performance

- *(encode)* one dictionary index per dictionary for attached and copied
frames
([#662](#662))
- *(decoding)* decode small frames' long matches without libc memcpy
([#658](#658))
- *(encode)* trim dfast tail seeding and the optimal parser's per-node
work
([#656](#656))
- *(encode)* one page fault per table page on a fresh workspace
([#655](#655))
- *(decoding)* close the x86 decode gap to libzstd
([#652](#652))

### Testing

- *(bench)* measure ours with and without the raw skip
([#644](#644))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: sw-release-bot[bot] <255865126+sw-release-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(bench): measure ours with and without the raw skip, and switch between them on the dashboard

1 participant