Skip to content

docs(benchmarks): re-execute after four releases - #49

Open
michen00 wants to merge 2 commits into
mainfrom
docs/re-execute-the-notebook
Open

docs(benchmarks): re-execute after four releases#49
michen00 wants to merge 2 commits into
mainfrom
docs/re-execute-the-notebook

Conversation

@michen00

@michen00 michen00 commented Sep 3, 2026

Copy link
Copy Markdown
Owner

What changes, and why

The notebook is committed with its outputs because GitHub renders it from what the file holds rather than by running it — so the stored outputs are the published page. They were produced on 2026-08-21, and two later commits edited the file without re-running it, so the page had drifted from the tree it describes.

the page said the tree says
235 tracked Markdown files, 10 in scope, 225 excluded 326 tracked, 11 in scope, 315 excluded
releases ending before v0.1.2 all twelve tags through v0.4.0
"the parent of this commit" true again — 1e9ac89
mean 10,4xx bytes per in-scope file 118 KiB in scope, mean 10,986 bytes

Every code cell still carried an execution_count from that single run.

The run

Re-executed with the command in CONTRIBUTING.md — kernel named, timeout raised — with the release binary built beforehand and nothing else running. All three of the notebook's own checks pass in the new outputs:

  • Both implementations agree. cell05: "Both implementations returned identical bytes and identical exit codes for every row above."
  • Nothing changed underneath the run. No cell reports a modified file.
  • No median sits far above its own minimum. The cheapest process reports 1.20 ms against a 1.33 ms median; the Rust program 2.02 against 2.11; the Python program 26.72 against 27.62. A busy machine shows up here as a failed check, and none failed.

The three charts are regenerated beside it. ruff reads the notebook natively and passes, as does check-added-large-files.

Two comments in the cells

They go with the run because editing a code cell is what makes a re-run necessary.

One comment annotated its read as "The only read in this notebook that named no encoding, which meant it decoded with whatever the platform default happened to be" — and the read immediately below it names encoding='utf-8'. So it described a past state of its own line. It now states the reason instead.

The claim was also wrong in the other direction: the Cargo.toml read in cell01 named no encoding, so it was not the only one. That read now names utf-8, which makes the comment true of every read in the notebook.

Note

CLAUDE.md's claim that no file carries a DEVIATION, blocked on comment still holds — git grep -l matches only CLAUDE.md, which describes the convention, and the notebook, which defines the marker constant. The collector prints nothing, as intended.

Corpus

The corpus is the specification, and both implementations answer to it. Tick what applies.

  • This changes no behavior the corpus specifies.
  • This changes what gets joined, and a case in corpus/ pins the new behavior. The case was written first and failed first.
  • The change makes the tool join more than it did. The section above says what it will not eat.

Checks

  • make check passes, or make test does and this touches no Rust.

make tidy — ruff over the notebook, both spell gates, check-added-large-files. The notebook's own checks are the substantive verification here, and they are quoted above. make test and the Rust suites were deliberately not run alongside the timings, per CONTRIBUTING; they ran on this tree before the notebook execution began.

The stored outputs were produced on 2026-08-21 and two later commits
edited the file without re-running it, so the page GitHub renders had
drifted from the tree it describes. It reported 235 tracked Markdown
files where there are 326, a release list ending before v0.1.2, and a
revision parenthetical claiming to name the parent of the commit
carrying it, which stopped being true the moment a later commit touched
the file. Every code cell still carried an execution count from that one
run.

Re-executed with the command in CONTRIBUTING, kernel named, on an idle
machine with the release binary built beforehand. All three of the
notebook's own checks pass in the new outputs: both implementations
returned identical bytes and identical exit codes, no file changed
underneath the run, and no median sits far above its own minimum -- the
cheapest process reports 1.20 ms against a 1.33 ms median, and the Rust
program 2.02 against 2.11. The three charts are regenerated beside it.

Two comments in the cells go with the run. One annotated a read as the
only one in the notebook naming no encoding, and the read below it names
one; the sentence now states the reason rather than a past state. The
claim was wrong the other way too, because the Cargo.toml read named
none, so that one now does and the comment is true of every read here.

Figures re-measured by running the notebook, which is the only way its
figures ever change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Refresh benchmark notebook and generated charts

📝 Documentation 🐞 Bug fix 🕐 10-20 Minutes

Grey Divider

AI Description

• Refreshes benchmark outputs against current repository state and releases through v0.4.0.
• Regenerates all SVG charts from the latest Python and Rust timings.
• Makes notebook text reads explicitly UTF-8 for reproducible execution.
Diagram

graph TD
  R["Repository state"] --> N["Benchmark notebook"] --> P["Python tool"] --> C["Result checks"] --> O["Stored outputs"] --> S["SVG charts"]
  N --> B["Rust binary"] --> C
Loading
High-Level Assessment

Re-executing the authoritative notebook and committing its outputs is the appropriate approach because GitHub renders stored notebook state. Manually editing measurements or charts risks inconsistency, while automated CI benchmarking would introduce uncontrolled runner variance and is unnecessary for this documentation refresh.

Files changed (4) +1028 / -1038

Documentation (4) +1028 / -1038
benchmarks-bytes.svgRegenerate file-size performance chart +82/-71

Regenerate file-size performance chart

• Regenerates the chart with current per-file timings, the 10,986-byte repository average, and the revised 13.3-times-or-more comparison.

docs/benchmarks-bytes.svg

benchmarks-startup.svgRegenerate startup-cost chart +214/-229

Regenerate startup-cost chart

• Updates startup and one-file timing bars from the new benchmark run, including the 1.20 ms process floor and current Python and Rust measurements.

docs/benchmarks-startup.svg

benchmarks.ipynbRe-execute benchmark notebook with current repository data +97/-89

Re-execute benchmark notebook with current repository data

• Refreshes execution metadata, repository statistics, release history, timing tables, checks, and conclusions through v0.4.0. It also makes the Cargo manifest read explicitly UTF-8 and clarifies the notebook's encoding rationale.

docs/benchmarks.ipynb

benchmarks.svgRegenerate benchmark scaling charts +635/-649

Regenerate benchmark scaling charts

• Refreshes the Python and Rust file-count scaling curves and relative-performance plot using the latest benchmark measurements.

docs/benchmarks.svg

@codecov-commenter

codecov-commenter commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.37%. Comparing base (1e9ac89) to head (fae4ea4).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #49   +/-   ##
=======================================
  Coverage   87.37%   87.37%           
=======================================
  Files           3        3           
  Lines         689      689           
=======================================
  Hits          602      602           
  Misses         87       87           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can add REVIEW.md to your repo root and Qodo follows it on every PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Two comments in this notebook disagreed about the same design decision.
The one above `SPREAD_LIMIT` said the number was taken from the startup
rows. The one at the check that uses it argues the opposite, and gives
the reason: the reference programs' spread is reported as evidence
rather than used as the tolerance, because a tolerance drawn from three
sub-millisecond rows would loosen every other row on the run where one
of them stuttered.

The second is the design, and the first described how the number might
have been picked rather than what it is for. Reworded to say what it
holds and why it is not derived from the rows it sits above.

The other half of the claim survives re-measurement, which is why it is
kept. On this run the startup rows sit +8.6%, +8.9% and +14.8% above
their own minima, all inside the limit; the figures that made the
description look wrong came from outputs recorded before the last four
releases.

Re-executed rather than committed alone, because the outputs are the
page and they should come from the source above them even when the
change cannot move a number.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Changes are confined to re-executed documentation artifacts and a small, correctness-improving encoding tweak with no impact on tool behavior.

Pull request overview

This PR refreshes the committed benchmark artifacts so the rendered documentation matches the repository state after recent releases and notebook edits (the notebook outputs are the published page).

Changes:

  • Re-executes docs/benchmarks.ipynb, updating stored outputs/metrics to reflect current tags and repository file counts.
  • Regenerates the benchmark charts (docs/benchmarks*.svg) to match the updated run results.
  • Tightens notebook reproducibility by explicitly reading Cargo.toml as UTF-8 (consistent with other reads in the notebook).
File summaries
File Description
docs/benchmarks.ipynb Updated execution metadata, outputs, and a small code/comment tweak to keep the notebook’s narrative and reads consistent.
docs/benchmarks.svg Regenerated primary benchmark chart to match the latest notebook run.
docs/benchmarks-startup.svg Regenerated startup-cost chart based on the latest timings.
docs/benchmarks-bytes.svg Regenerated per-byte scaling chart based on the latest measurements.
Review details
  • Files reviewed: 1/4 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

3 participants