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

aio-libs / multidict / 38887714464
86%

Build:
DEFAULT BRANCH: master
Ran 16 Oct 2026 10:32AM 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

16 Oct 2026 10:30AM UTC coverage: 85.863%. Remained the same
38887714464

push

github

web-flow
Add reflist_push2() for key and value pairs (#1802)

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

## What do these changes do?

Adds `reflist_push2()`, which defers a key and a value together with a
single capacity check; a pair that straddles a storage boundary falls
back to two single pushes in a cold helper, so every block but the
newest stays full. The three call sites that pushed a key and a value
back to back (`md_del_at_deferred()`, `_removed_pairs_spill()` and
`_md_update_store()`) use it now, which also drops their hand-written
two-push error handling. C extension only; the pure-Python backend has
no reflist.

Callgrind on 3.14.7, base dc809d83, rows that moved by 0.3% or more:

| operation | GIL | FT |
|---|---|---|
| `update`, MultiDict | -2.34% | -2.92% |
| `update`, CIMultiDict | -1.54% | -2.27% |
| `add`, MultiDict / CIMultiDict | +0.66% / +0.57% | |
| `add_istr`, MultiDict / CIMultiDict | +0.38% / +0.64% | |
| `d[key] = v`, new key, MultiDict / CIMultiDict | +0.50% / +0.41% | |
| `setdefault`, new key, MultiDict / CIMultiDict | +0.41% / +0.35% | |

The GIL insert rows grow by 2 to 3 instructions. `md_add_with_hash()`
does not touch the reflist, and it makes the same out-of-line calls as
before, but it grew by 348 bytes; most likely the smaller `_md_update()`
freed inlining budget that GCC spent there. Not investigated further.

## Are there changes in behavior for the user?

No.

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

No, it is a small helper next to `reflist_push()`.

## Related issue number

N/A

## Checklist

- [x] I think the code is well written
- [ ] Unit tests for the changes exist (N/A, covered by the existing
update, delete and replace tests)
- [ ] Documentation reflects the changes (N/A, internal helper)
- [ ] 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... (continued)

842 of 1684 branches covered (50.0%)

Branch coverage included in aggregate %.

9799 of 10709 relevant lines covered (91.5%)

1.83 hits per line

Jobs
ID Job ID Ran Files Coverage
1 MyPy - 38887714464.1 16 Oct 2026 10:32AM UTC 100
85.86
GitHub Action Run
Source Files on build 38887714464
  • 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 #38887714464
  • f7b22378 on github
  • Prev Build on master (#38861040533)
  • Next Build on master (#38903129284)
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