Repository navigation
Conversation
fpedd
force-pushed
the
python-core-cleanup
branch
2 times, most recently
from
September 29, 2026 21:21
2aae312 to
3fc0c75
Compare
fpedd
force-pushed
the
python-core-cleanup
branch
2 times, most recently
from
October 17, 2026 11:37
cc9a6d8 to
baa56a1
Compare
fpedd
force-pushed
the
python-core-cleanup
branch
from
October 17, 2026 13:09
baa56a1 to
ebe98a2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacking around pins was quadratic once anything was pinned, and stayed quadratic in the number of gaps between pins. A max tree over the gaps' free widths now finds each free item's first-fit gap in O(log gaps): identical results on 50k fuzzed layouts, 20k items with 10% pins from 9.2 s to 26 ms, and 10k items over 10k gaps from 3 s to 22 ms, with the pin-free path unchanged. BaseAllocator.allocate returns its result in input order as a documented contract and checks all postconditions in one pass, the raw-sequence path no longer wraps the input in temporary pools, and ensure_unique_ids takes a set-size fast path that keeps its TypeError for entities without an id.
An empty pinned pool no longer counts as overlapping another pool (validate, Memory and Pool.overlaps share one half-open overlap helper). Memory.is_allocated now also requires every pool base, so it agrees with Memory.extent; plot_allocation still draws packed pools without a base where Memory.allocate would put them, and still draws pinned pools that overlap (only Memory.allocate rejects those). Saving a pool whose ids collide as text raises, and every pool is checked before any file is written. Unknown registry names raise ValueError from both get and resolve. The matplotlib fallback stubs in visualize are gone, and the primitive tests are flattened into parametrized tables.
Kept on purpose: Memory.used_size (ALTO reads it), Memory/System.any_allocated, Pool.overlaps, available_cores, the unit constants and require_optional's install_extra. Only the old lowest_gap helper is dropped.