Breakwater

Backtest / #997

perf: better string building

pypa/packaging#997 · merged 2026-01-06 · base 1c4e8056b1 → head 65092ce350 · ran on Docker

PASS

No behaviour divergence found by any probe.

Performance · Version

No realistic input family measured slower.

Measured in backtest packaging-v2 (same commits, run bt-997-27f243, image bw-pair:d358a5c896312bf0). The semantic results above are from a later run; perf doesn't use the semantic planner, so it was not re-measured.

head slowerhead faster1×101001,00010,000input size (characters)F3F3: 1.00× at ~7 charsF3: 1.00× at ~11 charsF3: 1.00× at ~42 charsF3: 1.00× at ~186 charsF3: 1.00× at ~919 charsF3: 1.00× at ~4,016 charsF3: 1.00× at ~19,376 chars
  • F3
Head/base cachegrind instructions per call, by input size (log-log). Each line is one input family Nemotron proposed; points above 1× are where the "faster" code does more work.
FamilyInputsRatio range Slope base → headVerdict
F3Plain versions that have *only* a release segment (any length) and no epoch, pre, post, dev or local parts. The change was motivated by avoiding the `self.base_version` property access; the new code builds the release string directly with a single `join` and returns it.claimed speedup · plan1.00× – 1.00×0.74 → 0.74neutral

Receipt

TargetBackendImageRun AuditAdjudication
packaging.version:Versionlocal Dockerbw-pair:b6408f6a83d7d09dbt-997-7f3e77$0.033$0.000

Nemotron cost on Nebius Token Factory. Backend: where the untrusted code ran. local Docker (an image cited by its content-addressed tag). Every image is content-addressed (repo at each commit + harness), so every card re-runs from the image and seed 0. Raw data: audit.