• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

aio-libs / multidict / 37799903752
86%

Build:
DEFAULT BRANCH: master
Ran 08 Oct 2026 03:21PM UTC
Jobs 1
Files 50
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 Oct 2026 03:20PM UTC coverage: 86.01%. Remained the same
37799903752

push

github

web-flow
Fold the hash chain walk into _md_update() (#1757)

<!-- Thank you for your contribution! -->

## What do these changes do?

`_md_update_replace()`, the walk of the hash chain for each `update()`
item, was a separate out-of-line function. The call, with eight
arguments and the callee-saved register spills around it, cost about 25
instructions per item. Its loops now live in `_md_update()` itself,
which goes on to add the key when the walk does not find it. `merge()`
and `extend()` do not use this path.

The pure-Python backend has no equivalent call and is unchanged.

## Are there changes in behavior for the user?

No.

## Is it a substantial burden for the maintainers to support this?

No; one function fewer.

## Related issue number

Follow-up to #1755.

## Checklist

- [x] I think the code is well written
- [ ] Unit tests for the changes exist N/A, no behaviour change; covered
by the existing update() tests
- [x] Documentation reflects the changes
- [ ] If you provide code modification, please add yourself to
`CONTRIBUTORS.txt` N/A
- [x] Add a new news fragment into the `CHANGES/` folder
- [x] `make doc-spelling` passes and any new technical words are added
to `docs/spelling_wordlist.txt`

Drafted with Claude Code (Claude Opus 5.5); reviewed by @asvetlov.

<details>
<summary>Agent run details (optional, for reviewers)</summary>

Callgrind, `PYTHONHASHSEED=0`, per call with a 100-item argument (N=120
minus N=20 runs), base cfd8ea27, CPython 3.14.7 and 3.14.7t:

| case | GIL md / ci | FT md / ci |
| --- | --- | --- |
| update(dict), keys present | -10.2% / -9.3% | -8.0% / -7.0% |
| update(list), keys present | -9.1% / -8.5% | -6.5% / -5.8% |
| update(dict) into an empty multidict | -8.7% / -7.1% | -6.6% / -5.1% |
| update(dict), new keys into 100 | -7.9% / -6.9% | -6.0% / -4.9% |
| update(list) with duplicate keys | -6.9% / -6.2% | -5.1% / -4.3% |
| update(multidict) | -2.9..-4.3% | -1.8..-4.0% |
| merge(...) | 0.0% (-2.0% from a multidict) | 0.0..-0... (continued)

832 of 1664 branches covered (50.0%)

Branch coverage included in aggregate %.

9706 of 10588 relevant lines covered (91.67%)

1.83 hits per line

Jobs
ID Job ID Ran Files Coverage
1 MyPy - 37799903752.1 08 Oct 2026 03:21PM UTC 100
86.01
GitHub Action Run
Source Files on build 37799903752
  • Tree
  • List 50
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #37799903752
  • 45552bd4 on github
  • Prev Build on master (#37799616380)
  • Next Build on master (#37826871282)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc