Skip to content

Fix symbol table kind mask - #64762

Merged
Jake Bailey (jakebailey) merged 1 commit into
microsoft:mainfrom
jakebailey:symbol-table-kind-mask
Oct 13, 2026
Merged

Jake Bailey (jakebailey) merged 1 commit into
microsoft:mainfrom
jakebailey:symbol-table-kind-mask

Conversation

@jakebailey

Copy link
Copy Markdown
Member

The previous mask retained only one of the three kind bits, disabling alias caching for globals and raw exports and the members fast path. Oops.

The previous mask retained only one of the three kind bits, disabling
alias caching for globals and raw exports and the members fast path.
Copilot AI balanced review requested due to automatic review settings October 13, 2026 05:30
@typescript-automation typescript-automation Bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Oct 13, 2026
@jakebailey

Copy link
Copy Markdown
Member Author

TypeScript Bot (@typescript-bot) perf test this faster

@typescript-automation

typescript-automation Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
perf test this faster ✅ Started 👀 Results

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The corrected mask needs a regression test covering every symbol-table kind.

1 open finding
What changed in this PR

Corrects symbol-table kind extraction so alias caching and member fast paths work as intended.

Changes:

  • Preserve all three high-order kind bits in stKindMask.
File Description
tsc/​internal/​checker/​symbolaccessibility.go Fixes the symbol-table kind mask.

🧠 Review effort: Balanced


// stKindMask extracts the kind bits from a symbolTableID.
stKindMask symbolTableID = (iota - 1) << stKindShift
stKindMask symbolTableID = ^symbolTableID(1<<stKindShift - 1)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, yes, but the test just doesn't feel super great so I skipped it

@typescript-automation

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey)
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-Unions - native
Errors 41 41 ~ ~ ~ p=1.000 n=12
Symbols 115,276 115,276 ~ ~ ~ p=1.000 n=12
Types 79,613 79,613 ~ ~ ~ p=1.000 n=12
Memory Used 133,221k (± 0.07%) 133,158k (± 0.05%) ~ 133,035k 133,422k p=0.319 n=12
Memory Allocs 2,190,379 (± 0.01%) 2,190,334 (± 0.01%) ~ 2,190,086 2,190,644 p=0.932 n=12
Config Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Parse Time 0.041s (± 3.23%) 0.040s (± 3.14%) ~ 0.038s 0.044s p=0.552 n=12
Bind Time 0.012s (±14.64%) 0.013s (±16.51%) ~ 0.010s 0.019s p=0.772 n=12
Check Time 0.502s (± 0.72%) 0.502s (± 0.71%) ~ 0.491s 0.510s p=0.923 n=12
Emit Time 0.270s (± 2.16%) 0.266s (± 2.11%) ~ 0.248s 0.277s p=0.400 n=12
Total Time 0.831s (± 0.81%) 0.827s (± 0.67%) ~ 0.809s 0.840s p=0.297 n=12
angular-1 - native
Errors 3 3 ~ ~ ~ p=1.000 n=12
Symbols 845,704 (± 0.06%) 845,796 (± 0.09%) ~ 843,074 847,198 p=0.619 n=12
Types 248,125 (± 0.00%) 248,124 (± 0.00%) ~ 248,122 248,127 p=0.516 n=12
Memory Used 746,081k (± 0.02%) 746,053k (± 0.02%) ~ 745,641k 746,472k p=0.724 n=12
Memory Allocs 12,916,452 (± 0.05%) 12,913,726 (± 0.03%) ~ 12,909,166 12,931,482 p=0.478 n=12
Config Time 0.017s 0.017s ~ ~ ~ p=1.000 n=12
Parse Time 0.252s (± 2.20%) 0.258s (± 1.92%) ~ 0.246s 0.269s p=0.080 n=12
Bind Time 0.067s (±18.50%) 0.061s (±10.41%) ~ 0.057s 0.093s p=0.556 n=12
Check Time 0s 0s ~ ~ ~ p=1.000 n=12
Emit Time 1.559s (± 0.98%) 1.557s (± 0.75%) ~ 1.534s 1.590s p=0.966 n=12
Total Time 1.906s (± 1.25%) 1.907s (± 1.05%) ~ 1.873s 1.994s p=0.766 n=12
mui-docs - native
Errors 11,405 11,405 ~ ~ ~ p=1.000 n=12
Symbols 4,339,337 4,339,337 ~ ~ ~ p=1.000 n=12
Types 1,379,387 1,379,387 ~ ~ ~ p=1.000 n=12
Memory Used 2,775,595k (± 0.05%) 2,774,734k (± 0.06%) ~ 2,771,953k 2,779,872k p=0.266 n=12
Memory Allocs 32,731,049 (± 0.08%) 32,729,536 (± 0.05%) ~ 32,666,809 32,774,438 p=0.843 n=12
Config Time 0.017s 0.017s ~ ~ ~ p=1.000 n=12
Parse Time 0.505s (± 1.33%) 0.499s (± 2.97%) ~ 0.463s 0.546s p=0.877 n=12
Bind Time 0.002s 0.002s ~ ~ ~ p=1.000 n=12
Check Time 8.868s (± 0.57%) 8.854s (± 0.46%) ~ 8.806s 8.994s p=0.523 n=12
Emit Time 0.465s (±10.39%) 0.432s (± 5.04%) ~ 0.419s 0.541s p=0.943 n=12
Total Time 10.631s (± 0.47%) 10.580s (± 0.48%) ~ 10.508s 10.718s p=0.117 n=12
strada-build-src - native
Errors 0 0 ~ ~ ~ p=1.000 n=12
Symbols 1,388,669 1,388,669 ~ ~ ~ p=1.000 n=12
Types 441,862 441,862 ~ ~ ~ p=1.000 n=12
Memory Used 1,631,495k (± 1.02%) 1,631,986k (± 0.90%) ~ 1,606,265k 1,671,697k p=0.977 n=12
Memory Allocs 92,242,795 (± 0.17%) 92,295,957 (± 0.14%) ~ 91,900,808 92,599,360 p=0.671 n=12
Config Time 0.004s (± 9.39%) 0.003s (±16.58%) ~ 0.002s 0.005s p=0.971 n=12
Parse Time 0.203s (± 3.88%) 0.198s (± 4.78%) ~ 0.178s 0.220s p=0.434 n=12
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Check Time 1.818s (± 0.93%) 1.806s (± 0.42%) ~ 1.787s 1.831s p=0.066 n=12
Emit Time 0.303s (± 3.36%) 0.306s (± 2.51%) ~ 0.287s 0.329s p=0.580 n=12
Total Time 23.484s (± 0.58%) 23.470s (± 0.54%) ~ 22.995s 23.712s p=0.977 n=12
strada-compiler - native
Errors 0 0 ~ ~ ~ p=1.000 n=12
Symbols 334,953 334,953 ~ ~ ~ p=1.000 n=12
Types 197,616 197,616 ~ ~ ~ p=1.000 n=12
Memory Used 296,076k (± 0.03%) 296,077k (± 0.02%) ~ 295,856k 296,228k p=0.630 n=12
Memory Allocs 4,621,531 (± 0.01%) 4,621,537 (± 0.01%) ~ 4,620,662 4,622,826 p=0.744 n=12
Config Time 0.001s 0.001s ~ ~ ~ p=1.000 n=12
Parse Time 0.115s (± 5.43%) 0.112s (± 5.13%) ~ 0.096s 0.126s p=0.434 n=12
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Check Time 1.045s (± 0.80%) 1.039s (± 0.43%) ~ 1.030s 1.048s p=0.417 n=12
Emit Time 0.140s (±11.66%) 0.153s (± 6.60%) ~ 0.129s 0.176s p=0.272 n=12
Total Time 1.358s (± 0.89%) 1.358s (± 1.19%) ~ 1.322s 1.403s p=0.944 n=12
ts-pre-modules - native
Errors 87 87 ~ ~ ~ p=1.000 n=12
Symbols 303,834 303,834 ~ ~ ~ p=1.000 n=12
Types 181,663 181,663 ~ ~ ~ p=1.000 n=12
Memory Used 256,641k (± 0.02%) 256,653k (± 0.01%) ~ 256,585k 256,723k p=0.810 n=12
Memory Allocs 1,614,053 (± 0.01%) 1,613,923 (± 0.01%) ~ 1,613,127 1,614,466 p=0.410 n=12
Config Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Parse Time 0.100s (± 5.00%) 0.097s (± 4.97%) ~ 0.090s 0.111s p=0.339 n=12
Bind Time 0.039s (± 7.78%) 0.035s (±10.98%) ~ 0.028s 0.046s p=0.091 n=12
Check Time 0.814s (± 0.62%) 0.820s (± 0.64%) ~ 0.809s 0.835s p=0.201 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 0.967s (± 0.65%) 0.966s (± 0.63%) ~ 0.950s 0.985s p=0.832 n=12
vscode - native
Errors 396 396 ~ ~ ~ p=1.000 n=12
Symbols 11,292,425 11,292,425 ~ ~ ~ p=1.000 n=12
Types 3,726,187 3,726,187 ~ ~ ~ p=1.000 n=12
Memory Used 6,452,981k (± 0.01%) 6,452,823k (± 0.02%) ~ 6,450,982k 6,456,242k p=0.551 n=12
Memory Allocs 55,522,967 (± 0.03%) 55,515,814 (± 0.02%) ~ 55,501,904 55,553,949 p=0.932 n=12
Config Time 0.075s (± 0.56%) 0.075s (± 0.48%) ~ 0.074s 0.076s p=0.494 n=12
Parse Time 1.866s (± 3.03%) 1.846s (± 3.29%) ~ 1.699s 1.968s p=0.682 n=12
Bind Time 0.517s (±18.15%) 0.566s (±18.02%) ~ 0.446s 0.854s p=0.154 n=12
Check Time 14.076s (± 0.72%) 14.018s (± 1.04%) ~ 13.619s 14.308s p=0.682 n=12
Emit Time 4.856s (± 9.52%) 5.057s (± 9.88%) ~ 4.158s 6.063s p=0.468 n=12
Total Time 21.470s (± 1.90%) 21.645s (± 1.99%) ~ 20.812s 22.485s p=0.418 n=12
webpack - native
Errors 585 585 ~ ~ ~ p=1.000 n=12
Symbols 1,315,766 1,315,766 ~ ~ ~ p=1.000 n=12
Types 618,033 618,033 ~ ~ ~ p=1.000 n=12
Memory Used 946,594k (± 0.01%) 946,772k (± 0.02%) ~ 946,393k 947,244k p=0.089 n=12
Memory Allocs 6,687,387 (± 0.02%) 6,687,210 (± 0.03%) ~ 6,684,400 6,696,462 p=0.887 n=12
Config Time 0.009s 0.009s ~ ~ ~ p=1.000 n=12
Parse Time 0.305s (± 3.59%) 0.306s (± 4.13%) ~ 0.283s 0.339s p=0.966 n=12
Bind Time 0.077s (±18.24%) 0.077s (±15.66%) ~ 0.063s 0.117s p=0.898 n=12
Check Time 2.131s (± 0.55%) 2.142s (± 0.50%) ~ 2.111s 2.161s p=0.075 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 2.556s (± 0.49%) 2.569s (± 0.58%) ~ 2.532s 2.609s p=0.147 n=12
xstate-main - native
Errors 0 0 ~ ~ ~ p=1.000 n=12
Symbols 1,065,632 1,065,632 ~ ~ ~ p=1.000 n=12
Types 390,378 390,378 ~ ~ ~ p=1.000 n=12
Memory Used 548,213k (± 0.02%) 548,286k (± 0.02%) ~ 548,059k 548,723k p=0.225 n=12
Memory Allocs 4,885,900 (± 0.08%) 4,886,334 (± 0.06%) ~ 4,881,192 4,894,755 p=0.514 n=12
Config Time 0.003s 0.003s ~ ~ ~ p=1.000 n=12
Parse Time 0.142s (± 2.78%) 0.145s (± 3.38%) ~ 0.133s 0.158s p=0.384 n=12
Bind Time 0.043s (±15.74%) 0.046s (±16.42%) ~ 0.032s 0.067s p=0.786 n=12
Check Time 1.154s (± 1.07%) 1.146s (± 0.55%) ~ 1.137s 1.171s p=0.130 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 1.353s (± 0.83%) 1.350s (± 0.59%) ~ 1.327s 1.368s p=0.702 n=12
System info unknown
Hosts
  • native
Scenarios
  • Compiler-Unions - native
  • angular-1 - native
  • mui-docs - native
  • strada-build-src - native
  • strada-compiler - native
  • ts-pre-modules - native
  • vscode - native
  • webpack - native
  • xstate-main - native
Benchmark Name Iterations
Current pr 12
Baseline baseline 12

Developer Information:

Download Benchmarks

@github-project-automation github-project-automation Bot moved this from Not started to Needs merge in PR Backlog Oct 13, 2026
@jakebailey
Jake Bailey (jakebailey) added this pull request to the merge queue Oct 13, 2026
Merged via the queue into microsoft:main with commit 3789ddb Oct 13, 2026
29 checks passed
@jakebailey
Jake Bailey (jakebailey) deleted the symbol-table-kind-mask branch October 13, 2026 20:22
@github-project-automation github-project-automation Bot moved this from Needs merge to Done in PR Backlog Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants