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

aio-libs / multidict / 35971413209
87%

Build:
DEFAULT BRANCH: master
Ran 24 Sep 2026 07:46AM UTC
Jobs 1
Files 43
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

24 Sep 2026 07:46AM UTC coverage: 87.497%. Remained the same
35971413209

push

github

web-flow
Always inline the hash-table probe initializer (#1554)

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

## What do these changes do?

`htkeysiter_init()` sets five fields of the struct that walks a hash
chain, and every lookup, insertion and deletion in the extension starts
by calling it. GCC was emitting it out of line, so each of those paths
opened with a call. Marking it `ALWAYS_INLINE` removes the call.

Instructions per operation on a GIL build of CPython 3.13, measured with
`benchmarks/callgrind_driver.py` against `3336132`:

| operation | `MultiDict` | `CIMultiDict` |
| --- | ---: | ---: |
| `for k, v in d.items()` | -8.8% | -8.7% |
| `d.setdefault(key, v)`, new key | -5.0% | -2.5% |
| `d.get(key)`, miss | -4.5% | -2.2% |
| `d.pop(key)` | -4.1% | -2.2% |
| `d.update(other)` | -2.9% | -2.3% |
| `d[key] = v`, existing key | -2.7% | -2.2% |
| `d.getall(key)` | -1.7% | -1.2% |
| `d.popitem()` | -1.7% | -0.6% |

Nothing measured slower on either class. Free-threaded builds already
inlined it: `tools/codegen_diff.py` reports the emitted code byte for
byte identical there, so the change is a no-op on that build.

## Are there changes in behavior for the user?

No, other than the speed. The function's body is untouched.

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

No. It is one attribute, next to the existing `ALWAYS_INLINE` on
`md_calc_identity_hash()` and for the same reason.

## Related issue number

None.

## Checklist

- [x] I think the code is well written
- [x] Unit tests for the changes exist — N/A, no behaviour changes; the
existing suite covers every path this touches
- [x] Documentation reflects the changes — N/A
- [ ] If you provide code modification, please add yourself to
`CONTRIBUTORS.txt` — N/A, already listed
- [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`

<details>
<summary>Agent run details (optional, fo... (continued)

767 of 1534 branches covered (50.0%)

Branch coverage included in aggregate %.

7386 of 7784 relevant lines covered (94.89%)

1.9 hits per line

Jobs
ID Job ID Ran Files Coverage
1 MyPy - 35971413209.1 24 Sep 2026 07:46AM UTC 86
87.5
GitHub Action Run
Source Files on build 35971413209
  • Tree
  • List 43
  • 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 #35971413209
  • 130bd92c on github
  • Prev Build on master (#35971128892)
  • Next Build on master (#35971554192)
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