Skip to content

bench: add Skiff format throughput coverage - #51

Merged
sshaplygin merged 4 commits into
mainfrom
codex/skiff-data-format-benches
Aug 10, 2026
Merged

bench: add Skiff format throughput coverage#51
sshaplygin merged 4 commits into
mainfrom
codex/skiff-data-format-benches

Conversation

@sshaplygin

@sshaplygin sshaplygin commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a Skiff codec benchmark covering dynamic encode, dynamic decode, and validation-only skipping.
  • Adds direct YSON versus Skiff job-path comparisons for dynamic decoding and dynamic encoding.
  • Documents how to run the benchmarks and records the comparison results.

Dynamic decoding result

The direct decode comparison uses 100,000 identical rows per iteration and reads the duration field from each decoded dynamic value. It reports rows per second, rather than bytes per second, because the two wire formats have different encoded sizes.

Format Time Throughput
Binary YSON to YsonValue, keyed duration lookup 97.94 ms 1.021 M rows/s
Skiff to Value, positional duration lookup 30.67 ms 3.261 M rows/s

On the Apple M1 Max / rustc 1.94.0 setup, Skiff was 3.19x faster for this dynamic-job-API comparison.

Dynamic encoding result

The paired encode comparison constructs the same 100,000 logical rows as a keyed YsonValue map or positional Skiff Value tuple, then emits one complete table stream. It includes dynamic row construction and the format record separator or table tag.

Format Time Throughput
Binary YSON YsonValue map to table stream 79.16 ms 1.263 M rows/s
Skiff Value tuple to table stream 29.19 ms 3.426 M rows/s

Skiff was 2.71x faster for this dynamic encode path.

These are results for the current Rust dynamic APIs and their differing row representations. They are not protocol-wide claims or predictions for typed, borrowed YSON jobs.

Validation

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace
  • cargo test --doc
  • cargo bench -p ytsaurus-job --bench job_throughput -- YSON vs Skiff dynamic job API
  • cargo bench -p ytsaurus-job --bench job_throughput -- YSON vs Skiff dynamic encoding

@sshaplygin
sshaplygin merged commit 8861036 into main Aug 10, 2026
3 checks passed
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.

1 participant