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

aio-libs / multidict / 36340231354
86%

Build:
DEFAULT BRANCH: master
Ran 27 Sep 2026 06:20PM UTC
Jobs 1
Files 45
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

27 Sep 2026 06:19PM UTC coverage: 87.217%. Remained the same
36340231354

push

github

web-flow
Keep the hash table resize out of line (#1613)

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

## What do these changes do?

Moves the out-of-line boundary of the hash table resize onto the heavy
bodies. `_md_resize()` is `NOINLINE`, the GIL build's in-place shrink
moves into a `NOINLINE` `_md_shrink_impl()`, and `_md_shrink()` becomes
an inlined trampoline (FT reuses `_md_resize()` at the current size, as
before). `_md_resize_for_insert()` and `_md_resize_for_upd()` differed
only in `marks`, so they are merged into one `NOINLINE`
`_md_resize_for_add()`.

The GIL build used to carry a second, inlined copy of `_md_resize()`
inside `_md_resize_for_insert()`; now each build has a single copy. The
dispatcher stays out of line on purpose: inlining it made
`md_add_with_hash_steal_refs()` save two more registers on every call
(+3 Ir per add on GIL, `ctor_items` +1.8%), and a `COLD` dispatcher
behind `UNLIKELY` cost about 17 Ir on every resize from the empty table
(`copy_small` +0.9%).

C extension only; the pure-Python backend has no equivalent.

## Are there changes in behavior for the user?

No.

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

No; it is an inlining change inside `hashtable.h` with one fewer
function.

## Related issue number

N/A

## Checklist

- [x] I think the code is well written
- [ ] Unit tests for the changes exist: N/A, no behaviour change;
covered by the existing suite
- [ ] Documentation reflects the changes: N/A
- [ ] 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 Opus 5.5 (Claude Code); reviewed by @asvetlov.

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

Callgrind (`benchmarks/callgrind_driver.py --include-multidict-only`,
`PYTHONHASHSEED=0`), CPython 3.14.7 and 3.14.7t, ag... (continued)

781 of 1562 branches covered (50.0%)

Branch coverage included in aggregate %.

8430 of 8999 relevant lines covered (93.68%)

1.87 hits per line

Jobs
ID Job ID Ran Files Coverage
1 MyPy - 36340231354.1 27 Sep 2026 06:20PM UTC 90
87.22
GitHub Action Run
Source Files on build 36340231354
  • Tree
  • List 45
  • 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 #36340231354
  • f61aa79a on github
  • Prev Build on master (#36312574728)
  • Next Build on master (#36342961613)
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