Repository navigation
Reuse name sets when enumerating union and intersection properties - #64817
Closed
Jake Bailey (jakebailey) wants to merge 1 commit into
Closed
Jake Bailey (jakebailey) wants to merge 1 commit into
Jake Bailey (jakebailey) wants to merge 1 commit into
Conversation
Jake Bailey (jakebailey)
added this pull request to stack #64806
October 14, 2026 14:20
Enumerating the properties of a union or intersection tracks which
names have already been combined. A fresh set is allocated for every
enumeration, and on large projects those sets account for a sizable
share of all allocated bytes, adding GC work for no lasting benefit.
Borrow the set from a per-checker free list instead. Enumeration can
recurse into other combined types, so each call still takes its own
set.
mui-docs:
│ before │ after │
│ allocated-B │ allocated-B vs base │
MUIDocs 4.389Gi ± 1% 4.092Gi ± 0% -6.76% (p=0.002 n=6)
│ before │ after │
│ allocs │ allocs vs base │
MUIDocs 23.32M ± 1% 23.18M ± 0% -0.60% (p=0.002 n=6)
Jake Bailey (jakebailey)
force-pushed
the
jakebailey/mem/reused-property-name-sets
branch
from
October 14, 2026 16:02
da7313e to
1526143
Compare
Jake Bailey (jakebailey)
removed this pull request from stack #64806
October 14, 2026 16:55
Member
Author
|
Folded into #64815. |
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.
Enumerating the properties of a union or intersection allocates a fresh set of already-combined names each time; on large projects those short-lived sets are a sizable share of all allocated bytes.
Part of the memory optimization stack summarized in #64734.