Skip to content

Switch to type SymbolName unique.Handle[string] - #64699

Draft
Jake Bailey (jakebailey) wants to merge 7 commits into
microsoft:mainfrom
jakebailey:intern-symbol-names
Draft

Jake Bailey (jakebailey) wants to merge 7 commits into
microsoft:mainfrom
jakebailey:intern-symbol-names

Conversation

@jakebailey

@jakebailey Jake Bailey (jakebailey) commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Symbol names are currently plain strings. Every identifier, symbol, symbol table key, and name-keyed cache holds its own 16-byte string header, every lookup hashes and compares the full text, and all of those pointers have to be scanned by the GC. On large projects that adds up to a lot of memory and GC work for what is effectively a small set of repeated names.

This PR interns symbol names instead:

  • ast.SymbolName is now a 32-bit ID into a process-wide, pointer-free intern table, so names cost 4 bytes, compare and hash as integers, and are invisible to the GC.
  • Identifiers are interned once in the parser and the name is stored on Identifier, so the binder, checker, and language service use it directly rather than reinterning node text on each lookup. The AST schema gains a SymbolName type; the JS API still sees strings.
  • A small per-parser cache lets repeated identifiers in a file skip the shared table.

Perf run: 3.7–13.4% less memory across the suite, mui-docs 10% faster, bind 18–24% faster, and no total-time regressions. Parse is 8–15% slower from hashing each identifier.

Interned names are never freed. That's bounded per program for tsc, but the table grows over a long language server session.

@typescript-automation typescript-automation Bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Oct 8, 2026
@jakebailey

Copy link
Copy Markdown
Member Author

TypeScript Bot (@typescript-bot) perf test this

@typescript-automation

typescript-automation Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

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

Command Status Results
perf test this ✅ Started 👀 Results

@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 135,310k (± 0.08%) 134,555k (± 0.05%) -754k (- 0.56%) 134,394k 134,762k p=0.000 n=12
Memory Allocs 2,190,636 (± 0.00%) 2,279,198 (± 0.05%) 🔻+88,562 (+ 4.04%) 2,275,969 2,282,067 p=0.000 n=12
Config Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Parse Time 0.050s (± 2.84%) 0.049s (± 3.22%) ~ 0.044s 0.053s p=0.502 n=12
Bind Time 0.015s (±13.33%) 0.030s (± 7.99%) 🔻+0.015s (+99.45%) 0.026s 0.036s p=0.000 n=12
Check Time 0.615s (± 0.71%) 0.612s (± 0.92%) ~ 0.602s 0.630s p=0.162 n=12
Emit Time 0.329s (± 2.14%) 0.338s (± 1.22%) +0.009s (+ 2.68%) 0.324s 0.348s p=0.034 n=12
Total Time 1.018s (± 0.96%) 1.037s (± 0.62%) +0.019s (+ 1.88%) 1.021s 1.057s p=0.001 n=12
angular-1 - native
Errors 3 3 ~ ~ ~ p=1.000 n=12
Symbols 845,989 (± 0.05%) 845,729 (± 0.09%) ~ 842,740 847,317 p=0.932 n=12
Types 248,124 (± 0.00%) 248,123 (± 0.00%) ~ 248,122 248,125 p=0.993 n=12
Memory Used 764,653k (± 0.02%) 746,535k (± 0.02%) -18,119k (- 2.37%) 746,119k 746,997k p=0.000 n=12
Memory Allocs 12,925,262 (± 0.06%) 13,352,078 (± 0.04%) +426,816 (+ 3.30%) 13,345,546 13,372,669 p=0.000 n=12
Config Time 0.016s (± 1.97%) 0.017s (± 1.07%) +0.001s (+ 3.05%) 0.016s 0.017s p=0.027 n=12
Parse Time 0.257s (± 2.58%) 0.259s (± 2.82%) ~ 0.234s 0.268s p=0.385 n=12
Bind Time 0.063s (±12.33%) 0.100s (±10.80%) 🔻+0.037s (+59.92%) 0.092s 0.150s p=0.000 n=12
Check Time 0s 0s ~ ~ ~ p=1.000 n=12
Emit Time 1.587s (± 1.21%) 1.626s (± 0.86%) +0.039s (+ 2.45%) 1.594s 1.679s p=0.004 n=12
Total Time 1.937s (± 1.28%) 2.014s (± 0.99%) +0.076s (+ 3.94%) 1.979s 2.101s p=0.000 n=12
mui-docs - native
Errors 11,405 11,405 ~ ~ ~ p=1.000 n=12
Symbols 4,359,614 4,359,614 ~ ~ ~ p=1.000 n=12
Types 1,376,379 1,376,379 ~ ~ ~ p=1.000 n=12
Memory Used 2,874,210k (± 0.05%) 2,568,218k (± 0.05%) 🟩-305,992k (-10.65%) 2,564,693k 2,571,397k p=0.000 n=12
Memory Allocs 32,870,213 (± 0.08%) 33,621,012 (± 0.06%) +750,799 (+ 2.28%) 33,575,749 33,692,494 p=0.000 n=12
Config Time 0.020s (± 1.21%) 0.020s (± 1.52%) ~ 0.020s 0.021s p=0.640 n=12
Parse Time 0.624s (± 2.60%) 0.604s (± 2.39%) 🟩-0.020s (- 3.14%) 0.568s 0.640s p=0.050 n=12
Bind Time 0.003s (±13.14%) 0.003s (±12.54%) ~ 0.002s 0.003s p=1.000 n=12
Check Time 10.344s (± 0.63%) 9.367s (± 0.38%) 🟩-0.977s (- 9.44%) 9.291s 9.463s p=0.000 n=12
Emit Time 0.510s (± 1.88%) 0.513s (± 1.14%) ~ 0.505s 0.535s p=0.199 n=12
Total Time 12.430s (± 0.51%) 11.545s (± 0.32%) 🟩-0.886s (- 7.12%) 11.449s 11.644s p=0.000 n=12
strada-build-src - native
Errors 0 0 ~ ~ ~ p=1.000 n=12
Symbols 1,390,229 1,390,229 ~ ~ ~ p=1.000 n=12
Types 441,498 441,498 ~ ~ ~ p=1.000 n=12
Memory Used 1,641,820k (± 0.88%) 1,623,524k (± 0.28%) -18,296k (- 1.11%) 1,612,197k 1,634,391k p=0.028 n=12
Memory Allocs 92,093,413 (± 0.16%) 95,246,262 (± 0.15%) +3,152,849 (+ 3.42%) 94,939,040 95,592,937 p=0.000 n=12
Config Time 0.003s (±14.60%) 0.003s (±14.59%) ~ 0.002s 0.004s p=0.784 n=12
Parse Time 0.191s (± 4.22%) 0.188s (± 2.57%) ~ 0.176s 0.199s p=0.639 n=12
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Check Time 1.820s (± 0.66%) 1.888s (± 0.45%) +0.068s (+ 3.72%) 1.869s 1.908s p=0.000 n=12
Emit Time 0.305s (± 5.01%) 0.321s (± 4.73%) ~ 0.283s 0.372s p=0.173 n=12
Total Time 23.652s (± 0.97%) 24.999s (± 0.56%) 🔻+1.347s (+ 5.70%) 24.737s 25.487s p=0.000 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 302,588k (± 0.03%) 299,768k (± 0.02%) -2,820k (- 0.93%) 299,594k 299,874k p=0.000 n=12
Memory Allocs 4,622,914 (± 0.01%) 4,830,806 (± 0.01%) 🔻+207,892 (+ 4.50%) 4,830,094 4,831,876 p=0.000 n=12
Config Time 0.001s (±29.38%) 0.001s (±65.70%) ~ 0.000s 0.001s p=0.193 n=12
Parse Time 0.092s (± 5.04%) 0.095s (± 4.82%) ~ 0.083s 0.110s p=0.223 n=12
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Check Time 0.878s (± 0.68%) 0.912s (± 0.42%) +0.034s (+ 3.83%) 0.900s 0.920s p=0.000 n=12
Emit Time 0.109s (±10.35%) 0.124s (± 6.74%) 🔻+0.015s (+13.72%) 0.098s 0.140s p=0.013 n=12
Total Time 1.121s (± 1.06%) 1.201s (± 1.07%) 🔻+0.081s (+ 7.20%) 1.160s 1.235s p=0.000 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 263,493k (± 0.02%) 260,182k (± 0.02%) -3,311k (- 1.26%) 259,924k 260,272k p=0.000 n=12
Memory Allocs 1,616,022 (± 0.01%) 1,791,998 (± 0.01%) 🔻+175,976 (+10.89%) 1,791,727 1,792,462 p=0.000 n=12
Config Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Parse Time 0.099s (± 3.19%) 0.098s (± 4.94%) ~ 0.089s 0.108s p=0.832 n=12
Bind Time 0.037s (± 9.76%) 0.070s (± 7.91%) 🔻+0.034s (+90.97%) 0.058s 0.081s p=0.000 n=12
Check Time 0.829s (± 0.76%) 0.860s (± 0.82%) +0.031s (+ 3.69%) 0.844s 0.878s p=0.000 n=12
Emit Time 0.000s (±217.90%) 0.000s ~ ~ ~ p=1.000 n=12
Total Time 0.981s (± 0.53%) 1.043s (± 0.71%) 🔻+0.062s (+ 6.29%) 1.026s 1.069s p=0.000 n=12
vscode - native
Errors 380 380 ~ ~ ~ p=1.000 n=12
Symbols 11,126,412 11,126,412 ~ ~ ~ p=1.000 n=12
Types 3,695,451 3,695,451 ~ ~ ~ p=1.000 n=12
Memory Used 6,709,468k (± 0.02%) 6,472,806k (± 0.02%) 🟩-236,662k (- 3.53%) 6,468,963k 6,477,601k p=0.000 n=12
Memory Allocs 54,762,461 (± 0.03%) 56,714,048 (± 0.02%) +1,951,587 (+ 3.56%) 56,703,781 56,758,908 p=0.000 n=12
Config Time 0.073s (± 0.56%) 0.074s (± 0.44%) +0.001s (+ 1.48%) 0.074s 0.075s p=0.000 n=12
Parse Time 1.812s (± 3.88%) 1.836s (± 3.66%) ~ 1.672s 2.035s p=0.671 n=12
Bind Time 0.622s (±18.49%) 0.831s (±15.00%) 🔻+0.209s (+33.64%) 0.690s 1.232s p=0.018 n=12
Check Time 13.958s (± 1.17%) 14.712s (± 0.99%) 🔻+0.753s (+ 5.40%) 14.238s 14.937s p=0.000 n=12
Emit Time 4.908s (±12.67%) 4.654s (± 8.71%) ~ 4.184s 6.004s p=0.443 n=12
Total Time 21.463s (± 2.41%) 22.186s (± 1.51%) ~ 21.711s 23.306s p=0.143 n=12
webpack - native
Errors 589 589 ~ ~ ~ p=1.000 n=12
Symbols 1,304,270 1,304,270 ~ ~ ~ p=1.000 n=12
Types 618,461 618,461 ~ ~ ~ p=1.000 n=12
Memory Used 958,988k (± 0.01%) 925,774k (± 0.02%) 🟩-33,214k (- 3.46%) 925,297k 926,313k p=0.000 n=12
Memory Allocs 6,606,657 (± 0.01%) 7,086,476 (± 0.04%) 🔻+479,819 (+ 7.26%) 7,081,900 7,094,237 p=0.000 n=12
Config Time 0.009s 0.009s ~ ~ ~ p=1.000 n=12
Parse Time 0.288s (± 3.23%) 0.291s (± 3.25%) ~ 0.267s 0.319s p=0.744 n=12
Bind Time 0.086s (±20.33%) 0.128s (±10.05%) 🔻+0.042s (+49.03%) 0.107s 0.177s p=0.001 n=12
Check Time 2.073s (± 1.02%) 2.127s (± 0.88%) +0.054s (+ 2.62%) 2.073s 2.162s p=0.001 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 2.491s (± 0.52%) 2.591s (± 0.63%) 🔻+0.101s (+ 4.03%) 2.558s 2.639s p=0.000 n=12
xstate-main - native
Errors 0 0 ~ ~ ~ p=1.000 n=12
Symbols 1,055,452 1,055,452 ~ ~ ~ p=1.000 n=12
Types 386,738 386,738 ~ ~ ~ p=1.000 n=12
Memory Used 570,764k (± 0.03%) 545,375k (± 0.03%) 🟩-25,389k (- 4.45%) 545,072k 545,991k p=0.000 n=12
Memory Allocs 4,859,932 (± 0.08%) 5,156,372 (± 0.09%) 🔻+296,440 (+ 6.10%) 5,146,655 5,173,137 p=0.000 n=12
Config Time 0.003s (± 6.23%) 0.003s (± 6.23%) ~ 0.002s 0.003s p=1.000 n=12
Parse Time 0.143s (± 2.40%) 0.145s (± 3.12%) ~ 0.131s 0.154s p=0.416 n=12
Bind Time 0.044s (±21.01%) 0.090s (±12.08%) 🔻+0.046s (+104.91%) 0.066s 0.111s p=0.000 n=12
Check Time 1.128s (± 0.48%) 1.130s (± 0.74%) ~ 1.112s 1.164s p=0.660 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 1.324s (± 0.56%) 1.374s (± 0.76%) +0.050s (+ 3.78%) 1.344s 1.394s p=0.000 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

lsp

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-UnionsLSP - native
Req 1 - updateOpen 13ms (±10.94%) 14ms (±10.03%) ~ 11ms 17ms p=0.513 n=12
Req 2 - geterr 699ms (± 0.41%) 709ms (± 0.64%) +9ms (+ 1.33%) 697ms 717ms p=0.002 n=12
Req 3 - references 53ms (± 4.78%) 52ms (± 7.15%) ~ 43ms 62ms p=0.382 n=12
Req 4 - navto 20ms (± 3.00%) 20ms (± 6.07%) ~ 18ms 26ms p=0.383 n=12
Req 5 - completionInfo count 1,363 1,363 ~ ~ ~ p=1.000 n=12
Req 5 - completionInfo 20ms (± 7.01%) 20ms (±11.54%) ~ 16ms 30ms p=0.136 n=12
CompilerLSP - native
Req 1 - updateOpen 12ms (±13.27%) 11ms (±10.67%) ~ 10ms 15ms p=1.000 n=12
Req 2 - geterr 298ms (± 0.64%) 318ms (± 0.60%) 🔻+20ms (+ 6.76%) 313ms 324ms p=0.000 n=12
Req 3 - references 50ms (± 3.62%) 49ms (± 4.22%) ~ 44ms 54ms p=0.678 n=12
Req 4 - navto 17ms (± 3.43%) 17ms (± 2.54%) ~ 15ms 17ms p=0.167 n=12
Req 5 - completionInfo count 1,525 1,525 ~ ~ ~ p=1.000 n=12
Req 5 - completionInfo 17ms (± 6.11%) 17ms (± 6.98%) ~ 15ms 21ms p=0.741 n=12
System info unknown
Hosts
  • native
Scenarios
  • CompilerLSP - native
  • Compiler-UnionsLSP - native
  • xstate-main-1-LSP - native
Benchmark Name Iterations
Current pr 12
Baseline baseline 12

startup

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
lsp-startup - native
Execution time 4.80ms (±365.08%) 4.83ms (±365.09%) +0.03ms (+ 0.62%) 0.00ms 491.10ms p=0.000 n=1200
tsgo-startup - native
Execution time 5.83ms (±365.09%) 5.88ms (±365.08%) +0.04ms (+ 0.73%) 0.00ms 593.40ms p=0.000 n=1200
System info unknown
Hosts
  • native
Scenarios
  • lsp-startup - native
  • tsgo-startup - native
Benchmark Name Iterations
Current pr 12
Baseline baseline 12

Developer Information:

Download Benchmarks

Symbols should share canonical names so identity checks and symbol-table
lookups do not repeatedly compare string contents. Preserve textual
behavior for diagnostics, emitted output, and the JavaScript API.
Known names and intermediate name operations should stay interned;
repeated interning and string round trips defeat the canonical
representation in frequently used lookup paths.
Symbol names need their own constructor and representation boundary,
without exposing generic string handles throughout the compiler.

Give name serialization a lossless escaped spelling and distinguish
unset names from valid empty names.
unique.Make registers a weak handle for every new string, which made
binding substantially slower and added allocations. Canonical names do
not need to be collected during a compilation, so a dedicated table can
make interning cheap.

Identifying names by a 32-bit ID also keeps them free of pointers, so
the symbol tables, nodes, and caches that store them cost the garbage
collector nothing to scan or write-barrier.
Binding, checking, and language features reinterned identifier text at
every symbol-table lookup, so interning cost was paid many times per
identifier and showed up as a large binding regression.

Interning once when the identifier is created lets every later lookup
use the stored name directly. The AST schema gains a SymbolName field
type so the generated Go AST and encoder carry the interned name while
the JavaScript API still sees a plain string.
Most identifiers in a file repeat a small set of names, and going to
the shared intern table for each one makes parsing noticeably slower,
especially when many files are parsed in parallel. A small per-parser
cache resolves repeated names without touching shared state.
@jakebailey

Copy link
Copy Markdown
Member Author

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

@typescript-automation

typescript-automation Bot commented Oct 15, 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

@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 113,479k (± 0.05%) 109,247k (± 0.06%) 🟩-4,232k (- 3.73%) 109,072k 109,388k p=0.000 n=12
Memory Allocs 2,212,486 (± 0.01%) 2,220,023 (± 0.01%) +7,536 (+ 0.34%) 2,219,635 2,220,280 p=0.000 n=12
Config Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Parse Time 0.039s (± 4.40%) 0.044s (± 3.77%) 🔻+0.005s (+13.03%) 0.040s 0.048s p=0.000 n=12
Bind Time 0.013s (±10.03%) 0.013s (± 8.82%) ~ 0.010s 0.017s p=0.395 n=12
Check Time 0.467s (± 0.43%) 0.456s (± 0.84%) -0.010s (- 2.23%) 0.448s 0.465s p=0.000 n=12
Emit Time 0.265s (± 1.66%) 0.267s (± 1.43%) ~ 0.258s 0.276s p=0.579 n=12
Total Time 0.791s (± 0.67%) 0.786s (± 0.42%) ~ 0.781s 0.795s p=0.103 n=12
angular-1 - native
Errors 3 3 ~ ~ ~ p=1.000 n=12
Symbols 847,026 (± 0.07%) 847,024 (± 0.11%) ~ 844,638 849,050 p=0.887 n=12
Types 247,032 (± 0.00%) 247,032 (± 0.00%) ~ 247,030 247,042 p=0.548 n=12
Memory Used 596,379k (± 0.03%) 560,230k (± 0.03%) 🟩-36,149k (- 6.06%) 559,817k 560,650k p=0.000 n=12
Memory Allocs 13,149,404 (± 0.09%) 13,172,319 (± 0.05%) +22,915 (+ 0.17%) 13,168,352 13,205,949 p=0.001 n=12
Config Time 0.017s (± 1.45%) 0.017s (± 1.07%) ~ 0.016s 0.017s p=1.000 n=12
Parse Time 0.221s (± 2.54%) 0.245s (± 4.57%) 🔻+0.024s (+10.71%) 0.220s 0.283s p=0.000 n=12
Bind Time 0.088s (±13.82%) 0.067s (±15.71%) 🟩-0.021s (-24.22%) 0.056s 0.100s p=0.005 n=12
Check Time 0s 0s ~ ~ ~ p=1.000 n=12
Emit Time 1.559s (± 1.24%) 1.532s (± 1.28%) -0.027s (- 1.74%) 1.484s 1.597s p=0.046 n=12
Total Time 1.904s (± 0.95%) 1.874s (± 1.06%) -0.031s (- 1.61%) 1.811s 1.922s p=0.020 n=12
mui-docs - native
Errors 11,405 11,405 ~ ~ ~ p=1.000 n=12
Symbols 4,331,835 4,331,835 ~ ~ ~ p=1.000 n=12
Types 1,370,520 1,370,520 ~ ~ ~ p=1.000 n=12
Memory Used 2,626,589k (± 0.07%) 2,273,471k (± 0.08%) 🟩-353,118k (-13.44%) 2,269,818k 2,278,100k p=0.000 n=12
Memory Allocs 27,705,934 (± 0.05%) 27,696,753 (± 0.06%) ~ 27,658,960 27,747,847 p=0.551 n=12
Config Time 0.017s (± 1.86%) 0.017s ~ ~ ~ p=0.093 n=12
Parse Time 0.468s (± 3.07%) 0.476s (± 4.02%) ~ 0.429s 0.513s p=0.451 n=12
Bind Time 0.002s 0.002s (± 9.47%) ~ 0.001s 0.002s p=1.000 n=12
Check Time 7.273s (± 0.66%) 6.394s (± 0.42%) 🟩-0.879s (-12.09%) 6.365s 6.491s p=0.000 n=12
Emit Time 0.497s (±11.53%) 0.461s (± 2.62%) ~ 0.420s 0.472s p=0.787 n=12
Total Time 8.998s (± 0.74%) 8.100s (± 0.22%) 🟩-0.897s (- 9.97%) 8.055s 8.145s p=0.000 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,317,489k (± 0.62%) 1,250,199k (± 0.49%) 🟩-67,289k (- 5.11%) 1,232,740k 1,272,021k p=0.000 n=12
Memory Allocs 78,188,492 (± 0.06%) 78,316,018 (± 0.15%) +127,526 (+ 0.16%) 77,974,859 78,560,994 p=0.020 n=12
Config Time 0.003s (± 8.75%) 0.006s (±13.52%) 🔻+0.003s (+97.44%) 0.004s 0.009s p=0.000 n=12
Parse Time 0.252s (± 3.11%) 0.279s (± 1.60%) 🔻+0.027s (+10.74%) 0.267s 0.291s p=0.000 n=12
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Check Time 1.677s (± 0.53%) 1.617s (± 0.39%) 🟩-0.061s (- 3.61%) 1.596s 1.633s p=0.000 n=12
Emit Time 0.297s (± 3.44%) 0.284s (± 3.71%) ~ 0.253s 0.310s p=0.061 n=12
Total Time 19.834s (± 0.51%) 19.290s (± 0.58%) -0.544s (- 2.74%) 19.005s 19.590s p=0.000 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 247,512k (± 0.03%) 235,878k (± 0.03%) 🟩-11,634k (- 4.70%) 235,668k 236,047k p=0.000 n=12
Memory Allocs 4,329,530 (± 0.01%) 4,347,875 (± 0.01%) +18,345 (+ 0.42%) 4,346,250 4,348,965 p=0.000 n=12
Config Time 0.001s 0.001s ~ ~ ~ p=1.000 n=12
Parse Time 0.111s (± 5.77%) 0.127s (± 2.34%) 🔻+0.016s (+14.15%) 0.118s 0.134s p=0.000 n=12
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Check Time 0.961s (± 0.56%) 0.945s (± 0.48%) -0.016s (- 1.65%) 0.933s 0.957s p=0.000 n=12
Emit Time 0.145s (± 4.78%) 0.149s (± 3.81%) ~ 0.129s 0.161s p=0.522 n=12
Total Time 1.273s (± 0.77%) 1.273s (± 0.60%) ~ 1.251s 1.288s p=0.744 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 215,246k (± 0.02%) 204,557k (± 0.02%) 🟩-10,689k (- 4.97%) 204,473k 204,646k p=0.000 n=12
Memory Allocs 1,401,509 (± 0.01%) 1,417,139 (± 0.02%) +15,630 (+ 1.12%) 1,416,670 1,417,761 p=0.000 n=12
Config Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Parse Time 0.096s (± 3.98%) 0.110s (± 4.09%) 🔻+0.015s (+15.16%) 0.099s 0.121s p=0.000 n=12
Bind Time 0.043s (± 8.47%) 0.039s (±10.15%) ~ 0.032s 0.051s p=0.102 n=12
Check Time 0.747s (± 0.83%) 0.729s (± 0.88%) -0.017s (- 2.33%) 0.715s 0.743s p=0.000 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 0.900s (± 0.64%) 0.893s (± 0.77%) ~ 0.876s 0.909s p=0.181 n=12
vscode - native
Errors 396 396 ~ ~ ~ p=1.000 n=12
Symbols 11,850,414 11,850,414 ~ ~ ~ p=1.000 n=12
Types 3,908,124 3,908,124 ~ ~ ~ p=1.000 n=12
Memory Used 5,600,881k (± 0.02%) 5,216,068k (± 0.03%) 🟩-384,813k (- 6.87%) 5,213,135k 5,220,738k p=0.000 n=12
Memory Allocs 57,029,448 (± 0.10%) 57,054,527 (± 0.02%) +25,079 (+ 0.04%) 57,033,205 57,086,847 p=0.000 n=12
Config Time 0.075s (± 0.43%) 0.076s (± 0.86%) ~ 0.075s 0.079s p=0.150 n=12
Parse Time 1.754s (± 2.09%) 1.903s (± 2.04%) 🔻+0.149s (+ 8.49%) 1.774s 2.010s p=0.000 n=12
Bind Time 0.669s (±13.18%) 0.549s (±13.23%) 🟩-0.120s (-17.90%) 0.472s 0.807s p=0.010 n=12
Check Time 14.650s (± 0.74%) 14.531s (± 0.84%) ~ 14.190s 14.751s p=0.514 n=12
Emit Time 5.671s (± 7.34%) 5.544s (± 6.48%) ~ 4.461s 6.013s p=0.561 n=12
Total Time 22.911s (± 1.46%) 22.686s (± 1.56%) ~ 21.652s 23.230s p=0.347 n=12
webpack - native
Errors 584 584 ~ ~ ~ p=1.000 n=12
Symbols 1,297,360 1,297,360 ~ ~ ~ p=1.000 n=12
Types 593,542 593,542 ~ ~ ~ p=1.000 n=12
Memory Used 784,599k (± 0.03%) 731,203k (± 0.03%) 🟩-53,396k (- 6.81%) 730,793k 731,773k p=0.000 n=12
Memory Allocs 6,034,028 (± 0.06%) 6,068,414 (± 0.04%) +34,386 (+ 0.57%) 6,063,913 6,075,621 p=0.000 n=12
Config Time 0.009s 0.009s (± 2.00%) ~ 0.009s 0.010s p=1.000 n=12
Parse Time 0.302s (± 3.50%) 0.306s (± 2.98%) ~ 0.279s 0.338s p=0.560 n=12
Bind Time 0.074s (± 3.57%) 0.075s (± 8.70%) ~ 0.064s 0.095s p=0.560 n=12
Check Time 2.133s (± 0.60%) 2.055s (± 0.43%) 🟩-0.077s (- 3.63%) 2.032s 2.077s p=0.000 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 2.554s (± 0.65%) 2.483s (± 0.57%) -0.070s (- 2.75%) 2.457s 2.528s p=0.000 n=12
xstate-main - native
Errors 0 0 ~ ~ ~ p=1.000 n=12
Symbols 1,062,854 1,062,854 ~ ~ ~ p=1.000 n=12
Types 390,845 390,845 ~ ~ ~ p=1.000 n=12
Memory Used 472,259k (± 0.02%) 434,074k (± 0.03%) 🟩-38,185k (- 8.09%) 433,757k 434,462k p=0.000 n=12
Memory Allocs 4,223,835 (± 0.07%) 4,245,930 (± 0.06%) +22,095 (+ 0.52%) 4,238,989 4,253,061 p=0.000 n=12
Config Time 0.003s (± 6.23%) 0.003s (± 8.64%) ~ 0.002s 0.003s p=1.000 n=12
Parse Time 0.133s (± 3.58%) 0.148s (± 2.41%) 🔻+0.014s (+10.75%) 0.138s 0.156s p=0.000 n=12
Bind Time 0.049s (±18.00%) 0.039s (±11.68%) ~ 0.032s 0.051s p=0.074 n=12
Check Time 1.010s (± 0.74%) 0.966s (± 0.87%) 🟩-0.044s (- 4.36%) 0.946s 0.989s p=0.000 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 1.202s (± 0.48%) 1.164s (± 0.70%) 🟩-0.038s (- 3.13%) 1.141s 1.177s p=0.000 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

Interning every identifier at parse time hashes its text, but the
scanner has just walked the same bytes. Hashing while scanning saves a
second pass over each identifier in the parser's hottest path.

                                                          │   sec/op    │   sec/op     vs base               │
    Parse/empty.ts-20                                       610.1n ± 2%   610.2n ± 1%       ~ (p=0.767 n=12)
    Parse/checker.ts-20                                     46.61m ± 3%   45.68m ± 3%  -1.99% (p=0.005 n=12)
    Parse/dom.generated.d.ts-20                             16.71m ± 2%   16.53m ± 3%       ~ (p=0.178 n=12)
    Parse/Herebyfile.mjs-20                                 786.8µ ± 2%   779.4µ ± 1%       ~ (p=0.319 n=12)
    Parse/jsxComplexSignatureHasApplicabilityError.tsx-20   218.6µ ± 2%   213.3µ ± 2%  -2.41% (p=0.012 n=12)
    geomean                                                 606.0µ        598.2µ       -1.29%
@jakebailey

Copy link
Copy Markdown
Member Author

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

@typescript-automation

typescript-automation Bot commented Oct 15, 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

@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 113,544k (± 0.07%) 109,252k (± 0.04%) 🟩-4,292k (- 3.78%) 109,128k 109,360k p=0.000 n=12
Memory Allocs 2,212,499 (± 0.01%) 2,220,006 (± 0.01%) +7,508 (+ 0.34%) 2,219,689 2,220,362 p=0.000 n=12
Config Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Parse Time 0.038s (± 4.50%) 0.043s (± 2.88%) 🔻+0.005s (+13.63%) 0.040s 0.046s p=0.000 n=12
Bind Time 0.014s (± 9.15%) 0.012s (± 7.92%) ~ 0.011s 0.015s p=0.138 n=12
Check Time 0.469s (± 0.80%) 0.452s (± 0.62%) 🟩-0.016s (- 3.45%) 0.446s 0.461s p=0.000 n=12
Emit Time 0.269s (± 2.12%) 0.269s (± 2.28%) ~ 0.254s 0.285s p=0.944 n=12
Total Time 0.796s (± 0.90%) 0.784s (± 0.73%) -0.012s (- 1.54%) 0.769s 0.799s p=0.011 n=12
angular-1 - native
Errors 3 3 ~ ~ ~ p=1.000 n=12
Symbols 847,116 (± 0.08%) 847,194 (± 0.08%) ~ 845,430 848,650 p=0.887 n=12
Types 247,033 (± 0.00%) 247,032 (± 0.00%) ~ 247,030 247,034 p=0.390 n=12
Memory Used 596,464k (± 0.02%) 560,313k (± 0.03%) 🟩-36,151k (- 6.06%) 559,807k 560,648k p=0.000 n=12
Memory Allocs 13,143,148 (± 0.05%) 13,173,236 (± 0.04%) +30,088 (+ 0.23%) 13,166,102 13,191,128 p=0.000 n=12
Config Time 0.020s (± 1.40%) 0.021s (± 6.20%) ~ 0.020s 0.025s p=0.443 n=12
Parse Time 0.286s (± 2.63%) 0.310s (± 2.80%) 🔻+0.024s (+ 8.36%) 0.288s 0.326s p=0.000 n=12
Bind Time 0.108s (±12.71%) 0.095s (±13.89%) ~ 0.076s 0.135s p=0.190 n=12
Check Time 0s 0s ~ ~ ~ p=1.000 n=12
Emit Time 1.907s (± 1.25%) 1.928s (± 2.31%) ~ 1.782s 2.037s p=0.284 n=12
Total Time 2.344s (± 1.13%) 2.374s (± 1.89%) ~ 2.211s 2.471s p=0.117 n=12
mui-docs - native
Errors 11,405 11,405 ~ ~ ~ p=1.000 n=12
Symbols 4,331,835 4,331,835 ~ ~ ~ p=1.000 n=12
Types 1,370,520 1,370,520 ~ ~ ~ p=1.000 n=12
Memory Used 2,625,369k (± 0.06%) 2,272,617k (± 0.07%) 🟩-352,751k (-13.44%) 2,268,756k 2,277,064k p=0.000 n=12
Memory Allocs 27,722,151 (± 0.14%) 27,711,856 (± 0.13%) ~ 27,664,278 27,886,220 p=0.551 n=12
Config Time 0.020s (± 1.59%) 0.020s (± 0.90%) ~ 0.020s 0.021s p=0.155 n=12
Parse Time 0.593s (± 3.32%) 0.604s (± 2.86%) ~ 0.551s 0.655s p=0.124 n=12
Bind Time 0.003s (± 8.64%) 0.002s (±13.40%) ~ 0.002s 0.003s p=0.089 n=12
Check Time 8.655s (± 0.16%) 7.611s (± 0.46%) 🟩-1.043s (-12.06%) 7.572s 7.740s p=0.000 n=12
Emit Time 0.750s (± 8.09%) 0.565s (± 3.04%) 🟩-0.184s (-24.57%) 0.506s 0.583s p=0.000 n=12
Total Time 10.937s (± 0.67%) 9.717s (± 0.28%) 🟩-1.220s (-11.15%) 9.639s 9.792s p=0.000 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,318,031k (± 0.91%) 1,249,734k (± 0.54%) 🟩-68,297k (- 5.18%) 1,234,336k 1,275,228k p=0.000 n=12
Memory Allocs 78,217,623 (± 0.06%) 78,188,817 (± 0.17%) ~ 77,764,171 78,445,656 p=0.755 n=12
Config Time 0.004s (± 9.20%) 0.008s (±18.01%) 🔻+0.004s (+90.20%) 0.005s 0.012s p=0.000 n=12
Parse Time 0.308s (± 2.05%) 0.327s (± 1.92%) 🔻+0.019s (+ 6.25%) 0.309s 0.341s p=0.001 n=12
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Check Time 2.000s (± 0.55%) 1.934s (± 0.36%) 🟩-0.066s (- 3.31%) 1.916s 1.949s p=0.000 n=12
Emit Time 0.342s (± 3.89%) 0.342s (± 1.98%) ~ 0.328s 0.361s p=0.745 n=12
Total Time 23.672s (± 0.48%) 23.174s (± 0.55%) -0.498s (- 2.10%) 22.829s 23.533s p=0.000 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 247,527k (± 0.03%) 235,858k (± 0.03%) 🟩-11,669k (- 4.71%) 235,696k 236,027k p=0.000 n=12
Memory Allocs 4,329,509 (± 0.01%) 4,347,864 (± 0.01%) +18,355 (+ 0.42%) 4,346,840 4,349,273 p=0.000 n=12
Config Time 0.001s 0.001s ~ ~ ~ p=1.000 n=12
Parse Time 0.113s (± 5.39%) 0.128s (± 3.31%) 🔻+0.015s (+13.03%) 0.110s 0.137s p=0.001 n=12
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Check Time 0.962s (± 0.72%) 0.950s (± 0.61%) -0.013s (- 1.30%) 0.935s 0.969s p=0.002 n=12
Emit Time 0.147s (± 7.01%) 0.143s (± 4.22%) ~ 0.126s 0.156s p=0.854 n=12
Total Time 1.276s (± 1.00%) 1.273s (± 0.82%) ~ 1.236s 1.294s p=1.000 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 215,249k (± 0.02%) 204,556k (± 0.02%) 🟩-10,693k (- 4.97%) 204,493k 204,649k p=0.000 n=12
Memory Allocs 1,401,614 (± 0.01%) 1,417,302 (± 0.01%) +15,688 (+ 1.12%) 1,416,588 1,417,751 p=0.000 n=12
Config Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Parse Time 0.080s (± 4.55%) 0.085s (± 3.45%) 🔻+0.005s (+ 6.88%) 0.077s 0.094s p=0.023 n=12
Bind Time 0.034s (± 7.66%) 0.030s (±10.12%) ~ 0.023s 0.037s p=0.066 n=12
Check Time 0.617s (± 0.86%) 0.607s (± 1.27%) -0.011s (- 1.75%) 0.593s 0.632s p=0.016 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 0.743s (± 0.73%) 0.734s (± 1.15%) -0.009s (- 1.22%) 0.721s 0.764s p=0.027 n=12
vscode - native
Errors 396 396 ~ ~ ~ p=1.000 n=12
Symbols 11,858,782 11,858,782 ~ ~ ~ p=1.000 n=12
Types 3,913,076 3,913,076 ~ ~ ~ p=1.000 n=12
Memory Used 5,602,594k (± 0.02%) 5,217,111k (± 0.02%) 🟩-385,483k (- 6.88%) 5,214,586k 5,220,496k p=0.000 n=12
Memory Allocs 57,046,573 (± 0.00%) 57,097,906 (± 0.02%) +51,333 (+ 0.09%) 57,077,234 57,127,863 p=0.000 n=12
Config Time 0.075s (± 0.70%) 0.075s (± 0.33%) ~ 0.075s 0.076s p=1.000 n=12
Parse Time 1.812s (± 2.12%) 1.923s (± 2.43%) 🔻+0.111s (+ 6.13%) 1.725s 2.029s p=0.001 n=12
Bind Time 0.573s (±10.43%) 0.501s (±12.43%) 🟩-0.072s (-12.56%) 0.452s 0.814s p=0.000 n=12
Check Time 14.773s (± 1.06%) 14.516s (± 0.63%) ~ 14.125s 14.686s p=0.097 n=12
Emit Time 5.620s (± 6.22%) 5.089s (± 6.75%) 🟩-0.530s (- 9.44%) 4.394s 6.185s p=0.028 n=12
Total Time 22.940s (± 1.16%) 22.183s (± 1.51%) 🟩-0.757s (- 3.30%) 21.501s 23.093s p=0.002 n=12
webpack - native
Errors 584 584 ~ ~ ~ p=1.000 n=12
Symbols 1,286,346 1,286,346 ~ ~ ~ p=1.000 n=12
Types 586,899 586,899 ~ ~ ~ p=1.000 n=12
Memory Used 775,946k (± 0.02%) 724,486k (± 0.01%) 🟩-51,460k (- 6.63%) 724,244k 724,703k p=0.000 n=12
Memory Allocs 5,993,657 (± 0.03%) 6,030,764 (± 0.02%) +37,106 (+ 0.62%) 6,028,538 6,035,314 p=0.000 n=12
Config Time 0.009s 0.009s ~ ~ ~ p=1.000 n=12
Parse Time 0.309s (± 2.75%) 0.311s (± 3.07%) ~ 0.292s 0.343s p=0.810 n=12
Bind Time 0.068s (± 1.94%) 0.069s (± 3.98%) ~ 0.065s 0.080s p=0.897 n=12
Check Time 1.953s (± 0.29%) 1.878s (± 0.40%) 🟩-0.074s (- 3.82%) 1.854s 1.895s p=0.000 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 2.373s (± 0.50%) 2.302s (± 0.55%) -0.071s (- 2.98%) 2.280s 2.343s p=0.000 n=12
xstate-main - native
Errors 0 0 ~ ~ ~ p=1.000 n=12
Symbols 1,062,854 1,062,854 ~ ~ ~ p=1.000 n=12
Types 390,845 390,845 ~ ~ ~ p=1.000 n=12
Memory Used 472,425k (± 0.04%) 434,137k (± 0.02%) 🟩-38,288k (- 8.10%) 433,890k 434,373k p=0.000 n=12
Memory Allocs 4,228,361 (± 0.09%) 4,250,806 (± 0.07%) +22,444 (+ 0.53%) 4,241,973 4,259,903 p=0.000 n=12
Config Time 0.002s 0.002s ~ ~ ~ p=1.000 n=12
Parse Time 0.103s (± 2.19%) 0.115s (± 2.65%) 🔻+0.011s (+11.03%) 0.108s 0.122s p=0.000 n=12
Bind Time 0.039s (±15.90%) 0.029s (±14.67%) 🟩-0.010s (-25.91%) 0.025s 0.047s p=0.001 n=12
Check Time 0.827s (± 0.99%) 0.806s (± 1.27%) -0.021s (- 2.51%) 0.786s 0.842s p=0.002 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 0.978s (± 1.16%) 0.958s (± 1.18%) -0.020s (- 2.08%) 0.935s 0.991s p=0.014 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

This branch has not been deployed

No deployments
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

None yet

Development

Successfully merging this pull request may close these issues.

1 participant