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

aio-libs / multidict / 35913838361
87%

Build:
DEFAULT BRANCH: master
Ran 23 Sep 2026 08:08PM UTC
Jobs 1
Files 42
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

23 Sep 2026 08:07PM UTC coverage: 87.44%. Remained the same
35913838361

push

github

web-flow
Shrink the walk bitmap's inline buffer (#1543)

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

## What do these changes do?

`bitmap_t` carried a 4 KB inline word buffer. It sits in the caller's
frame, twice over inside `update_marks_t`, and `md_walk()` is always
inlined, so that frame lands in every `getall()`, `popall()`,
`__delitem__()`, `__contains__()` and `to_dict()`. Past about 1 KB it
costs those callers more in the inlining it crowds out than it saves in
allocations.

Nothing else changes. `_bitmap_start()` already falls back to the heap
past the inline capacity, so only the crossover moves, and a table of up
to 8192 entries still gets its bitmap for free.

Instructions per operation on a GIL build, swept at 4096, 2048, 1024 and
512 bytes:

| case | 4096 | 2048 | 1024 | 512 |
| --- | --- | --- | --- | --- |
| `getall()` that hits | 1055 | 1054 | 1026 | 1026 |
| `getall()`, 16384-entry table | 270685 | 270429 | 266973 | 266973 |

Everything else is flat to within 0.1%, and `popall()` over the same
table exactly so. The cliff is between 2048 and 1024. 1024 keeps twice
the inline capacity of 512 for the same result, and 512 is the floor
anyway: below it `BITMAP_INLINE_SUMMARY` rounds down to zero entries and
the struct does not compile.

## Are there changes in behavior for the user?

No. A walk over a table between 8192 and 32768 entries now allocates a
bitmap where it did not before, but only once it has more matches than
the short list holds, and the numbers above cover that case.

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

No, it is one constant.

## Related issue number

None.

## Checklist

- [x] I think the code is well written
- [x] Unit tests for the changes exist — N/A,
`tests/test_update_marks.py` already crosses the inline/heap boundary
and passes at every value swept
- [x] Documentation reflects the changes
- [x] If you provide code modification, please add yourself to
`CONTRIBUTORS.txt` — N/A, no such file in t... (continued)

765 of 1530 branches covered (50.0%)

Branch coverage included in aggregate %.

7290 of 7682 relevant lines covered (94.9%)

1.9 hits per line

Jobs
ID Job ID Ran Files Coverage
1 MyPy - 35913838361.1 23 Sep 2026 08:08PM UTC 84
87.44
GitHub Action Run
Source Files on build 35913838361
  • Tree
  • List 42
  • 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 #35913838361
  • d4a086cd on github
  • Prev Build on master (#35913343317)
  • Next Build on master (#35914322178)
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