Repository navigation
Store PagedLinkStore page values inline - #65806
Open
Jake Bailey (jakebailey) wants to merge 1 commit into
Open
Jake Bailey (jakebailey) wants to merge 1 commit into
Jake Bailey (jakebailey) wants to merge 1 commit into
Conversation
PagedLinkStore previously stored a page of 256 *V pointers backed by a
separate Arena[V], requiring an extra pointer indirection per lookup
and a pointer-scanned page table even when V contains no pointers.
Store values inline in a 64-entry pagedLinkPage[V] (with a uint64
present bitmask for Has/TryGet), removing the pointer table and
separate Arena[V] allocations.
benchstat (-pgo=off, parent vs commit, n=6):
goos: linux
goarch: amd64
│ old │ new │
│ sec/op │ sec/op vs base │
Tsc/vscode 6.460 ± 2% 6.362 ± 2% ~ (p=0.180 n=6)
Tsc/mui-docs 3.917 ± 1% 3.837 ± 2% -2.04% (p=0.004 n=6)
geomean 5.030 4.941 -1.77%
│ old │ new │
│ B-rss │ B-rss vs base │
Tsc/vscode 4.650Gi ± 4% 4.702Gi ± 3% ~ (p=0.394 n=6)
Tsc/mui-docs 2.201Gi ± 6% 2.184Gi ± 7% ~ (p=0.180 n=6)
geomean 3.199Gi 3.204Gi +0.17%
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the PagedLinkStore inline-storage changes.
No open issues 🎉
What changed in this PR
This PR simplifies the compiler’s PagedLinkStore storage by keeping values inline, removing per-entry pointer indirection and separate arena allocations.
Changes:
- Replace 256-entry pointer pages with 64-entry inline value pages.
- Track initialized slots with a 64-bit presence mask for
HasandTryGet.
| File | Description |
|---|---|
tsc/internal/core/linkstore.go |
Introduces inline value pages and updates allocation and lookup logic. |
Review effort: Balanced
Member
Author
|
TypeScript Bot (@typescript-bot) perf test this faster |
Contributor
Contributor
|
Jake Bailey (@jakebailey) Here they are:
tscComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This branch has not been deployed
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.
PagedLinkStorepreviously stored a page of 256*Vpointers backed by a separateArena[V], requiring an extra pointer indirection per lookup and a pointer-scanned page table even whenVcontains no pointers.Store values inline in a 64-entry
pagedLinkPage[V](with auint64present bitmask forHas/TryGet), removing the pointer table and separateArena[V]allocations.