aio-libs
multidict
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
Cache MAXSIZE as a local on the same hot-path methods Same reasoning as the HASH_MARK caching: build_indices, find_empty_slot, iter_hash, del_idx, and restore_hash all read MAXSIZE off the module for every perturb calculation in their probe loop. Take it as a hidden keyword-only _maxsize argument defaulting to MAXSIZE, bound once at function definition time, so the loop body references a local instead of doing a global lookup on every iteration. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
asvetlov:new-marker
5 minutes ago
Cache the hash marker bit as a local, not a global, on the hot path Every function that XORs or tests the entry hash marker bit read the HASH_MARK module global each time, which is a dict lookup on every add, setitem, getall, and update call. Take it instead as a hidden keyword-only _hash_mask argument defaulting to HASH_MARK: default values are bound once at function definition time, so referencing _hash_mask inside the function body is a fast local access. The parameter is keyword-only so it doesn't widen the positional arity of public methods like getall and __setitem__, which need to keep matching the C extension's exact signature (test_incorrect_args checks this). Also rewrites the is-marked bound check to use _hash_mask alone (hash_ >= _hash_mask or hash_ < -_hash_mask) instead of mixing it with MAXSIZE, since MAXSIZE == HASH_MARK - 1. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
asvetlov:new-marker
17 minutes ago
Remove useless `pp*` skip selector in `cibuildwheel` configs PR #1283 Since cibuildwheel 3.0.0 pypy builds are no longer enabled by default [[1]]. We can remove the skip selector. This will also fix the following warning during build: ``` Warning: cibuildwheel: Invalid skip selector: 'pp*'. This selector matches a group that wasn't enabled. Enable it using the `enable` option or remove this selector. This selector will have no effect. ``` [1]: https://cibuildwheel.pypa.io/en/stable/changelog/#v300 Signed-off-by: Julien Stephan <jstephan@baylibre.com>
master
3 hours ago
Add CHANGES fragment for #1426
asvetlov:new-marker
5 hours ago
Mark temporarily-removed entries via the hash's high bit, not -1 The pure-Python _HtKeys used the literal sentinel -1 to mark an entry's hash as temporarily invalid while its slot was mid-update (getall, __setitem__, update/merge), discarding the real hash and falling back to hash(identity) to recompute it on restore. Replace the sentinel with HASH_MARK = MAXSIZE + 1 (the hash range's high bit) applied via XOR: XORing it always pushes the value outside hash()'s valid range (so iter_hash still skips the marked entry) without losing the original bits, and XORing the same bit again restores the exact original hash with no recomputation. A plain OR-to-set / AND-to-clear would not work here, since Python ints are arbitrary precision and a negative hash already reads that bit as set. Also caches sys.maxsize as a module-level MAXSIZE constant, reused by both the new marker and the existing perturb calculations.
asvetlov:new-marker
5 hours ago
Document design principle for pure-Python istr (#1425) Closes #1360
master
8 hours ago
Document design principle for pure-Python istr (#1425) Closes #1360
master
22 hours ago
Past tense
asvetlov:istr-note
22 hours ago
Latest Branches
CodSpeed Performance Gauge
-13%
Mark temporarily-removed entries via the hash's high bit, not -1
#1426
10 minutes ago
4a72fd1
asvetlov:new-marker
CodSpeed Performance Gauge
0%
Document design principle for pure-Python istr
#1425
22 hours ago
d8cd877
asvetlov:istr-note
CodSpeed Performance Gauge
0%
Fix changelog entries to use past tense
#1424
1 day ago
4e017c5
asvetlov:fix-changes
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs