Repository navigation
Store merged symbols in a paged symbol link store - #64869
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
getMergedSymbol runs on nearly every symbol access, and almost every
call misses because few symbols are merge sources. Each miss still
paid for a pointer-keyed map hash and probe.
Indexing by dense symbol ID makes the common miss a range check and
a page load.
--checkers 4, n=8, default GC settings:
│ before │ after │
│ sec/op │ sec/op vs base │
Tsc/bluesky 2.799 ± 2% 2.767 ± 1% ~ (p=0.266 n=8)
Tsc/sentry 10.86 ± 2% 10.78 ± 2% ~ (p=0.314 n=8)
Tsc/t3code-server 13.89 ± 6% 13.50 ± 4% -2.85% (p=0.050 n=8)
geomean 7.502 7.384 -1.58%
│ before │ after │
│ rss-B │ rss-B vs base │
Tsc/bluesky 1.203Gi ± 2% 1.183Gi ± 2% ~ (p=0.291 n=8)
Tsc/sentry 3.535Gi ± 6% 3.549Gi ± 6% ~ (p=1.000 n=8)
Tsc/t3code-server 2.877Gi ± 3% 2.880Gi ± 2% ~ (p=0.721 n=8)
geomean 2.304Gi 2.296Gi -0.37%
│ before │ after │
│ heap-B │ heap-B vs base │
Tsc/bluesky 934.8Mi ± 0% 934.5Mi ± 0% -0.04% (p=0.038 n=8)
Tsc/sentry 2.603Gi ± 0% 2.608Gi ± 0% +0.16% (p=0.000 n=8)
Tsc/t3code-server 2.312Gi ± 0% 2.301Gi ± 0% -0.45% (p=0.000 n=8)
geomean 1.765Gi 1.763Gi -0.11%
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused storage substitution preserves lookup behavior, with no unresolved findings.
No open issues 🎉
What changed in this PR
Replaces the checker’s merged-symbol map with an existing paged store indexed by symbol ID to reduce lookup overhead.
Changes:
- Uses a zero-initialized
symbolLinkStoreinstead of an explicitly initialized map. - Updates reads and writes while preserving fallback to the original symbol.
| File | Description |
|---|---|
tsc/internal/checker/checker.go |
Migrates merged-symbol storage and access to the paged store. |
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.
getMergedSymbol runs on nearly every symbol access, and almost every call misses because few symbols are merge sources. Each miss still paid for a pointer-keyed map hash and probe.
Indexing by dense symbol ID makes the common miss a range check and a page load.
--checkers 4, n=8, default GC settings: