Repository navigation
Say which benchmark rows are not 200-item mappings - #1558
Conversation
6d10fb1 to
b2013e9
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1558 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 41 41
Lines 7022 7074 +52
Branches 610 615 +5
=========================================
+ Hits 7022 7074 +52
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
| Three rows use a different size, because what they cost is dominated by an | ||
| allocation rather than by the entries: ``cls()`` builds an empty mapping, and | ||
| ``cls(items)``, 20 items and ``d.copy()``, 20 items use a request's worth of | ||
| headers. An allocation is a fixed cost, so at 200 entries it is divided across | ||
| them and all but disappears; ``d.items()`` and ``iter(d)`` are listed for the |
There was a problem hiding this comment.
The explanation describes the 20-item constructor and copy rows as dominated by fixed allocation costs. Yet the published dict instruction counts rise from 9,257 to 91,347 for construction and from 1,452 to 9,761 for copying at 200 items. Readers could mistake these rows for measurements of mostly fixed overhead rather than operations with substantial per-entry work. This wording is a non-blocking documentation concern.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Artifacts
Source of the published-value benchmark check
- The authored check executes benchmark cases and compares the published instruction tables; it provides the reproducible verification command.
Benchmark check on the parent revision
- The check ran against HEAD^ with exit code 0 and found the same instruction-count pattern before the claim was added.
Benchmark check on the revision containing the claim
- The check ran against HEAD with exit code 0 and found entry-dependent instruction growth inconsistent with allocation dominance.
Comments Outside DiffThese findings sit on lines the diff does not cover, so they could not be posted inline. Each one leaves this list once its file changes.
|
What do these changes do?
"What is measured" says every row uses a mapping of 200 keys, with
d.update(other)as the only exception. Since #1556 that is no longertrue:
cls()builds an empty mapping and two rows use 20 items, so areader comparing them against the 200-key rows would draw the wrong
conclusion. This says which rows those are and why they differ.
Are there changes in behavior for the user?
No. Prose only; no measurement or table changes.
Is it a substantial burden for the maintainers to support this?
No.
Related issue number
Follows up #1556.
Checklist
CONTRIBUTORS.txt— N/A, already listedCHANGES/foldermake doc-spellingpasses and any new technical words are added todocs/spelling_wordlist.txtDrafted with Claude Opus 5; reviewed by @asvetlov.