Skip to content

Cache homomorphic mapped type constituent instantiations under their re-instantiation key - #65562

Merged
Jake Bailey (jakebailey) merged 6 commits into
mainfrom
copilot/report-typescript-bug
Nov 19, 2026
Merged

Jake Bailey (jakebailey) merged 6 commits into
mainfrom
copilot/report-typescript-bug

Conversation

@RyanCavanaugh

@RyanCavanaugh Ryan Cavanaugh (RyanCavanaugh) commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

An aliased homomorphic mapped type such as type Options = Partial<{ verbose: boolean }> gets a structurally identical duplicate each time it is instantiated again. This shows up as repeated union members. It also makes inference quadratic (inferFromMatchingTypes falls back to isTypeIdenticalTo) and causes spurious TS2859 errors.

type Options = Partial<{ verbose: boolean }>;
declare const values: (Options | string)[];
const both = either(values[0], values.map(v => v)[0]);
// before: string | Partial<{ verbose: boolean; }> | Partial<{ verbose: boolean; }>
// after:  string | Partial<{ verbose: boolean; }>

Root cause

  • getObjectTypeInstantiation caches under (outer type args, alias). Here that key is ([{verbose}], Options).
  • The homomorphic path in instantiateMappedType builds each constituent with instantiateAnonymousType directly, so the constituent is never cached. It gets the alias Partial<{verbose}>.
  • Instantiating that result again looks up ([{verbose}], Partial<{verbose}>). Nothing is stored there, so a duplicate is created.
  • The same happens for union arguments (Partial<A | B>) and for separate aliases of one instantiation (type A1 = Partial<N>; type A2 = Partial<N>).

Change (checker.go)

  • New getMappedTypeConstituentInstantiation stores each constituent in the mapped type's instantiations map. The key is (mapper applied to the outer type parameters, instantiateTypeAlias(t.alias, mapper)), which is exactly the key re-instantiation computes. Printed types are unchanged.
  • Guard: the cache is skipped when prependTypeMapping(T, s, m).Map(T) != s.
    • This happens when the constituent s is itself one of the mapped type's type parameters and m maps it again. The merged mapper then sends T to m.Map(s).
    • In that case the result doesn't match the instantiation for its key, so caching it would make results depend on checking order. Example: type F<T, U> = { [K in keyof T]: F<U, string> } could make F<string, string> an object type instead of string.
    • Those instantiations are created uncached, as before.

Tests

  • homomorphicMappedTypeReinstantiation: Partial, Readonly, a custom homomorphic type, union arguments (with and without an alias), and the A1/A2 aliases.
  • homomorphicMappedTypeReinstantiationLargeUnion: the issue's 4,000-key repro (no errors expected).
  • homomorphicMappedTypeReinstantiationOverlappingParameters: self-referential types with overlapping type parameters, in primitive, union and array forms. Baselines are identical to the compiler before this change.

Perf (issue repro, --singleThreaded, check time / peak RSS)

ids before after
1,000 0.51 s / 95 MB 0.018 s / 29 MB
2,000 2.4 s / 321 MB 0.022 s / 31 MB
4,000 10.9 s / 1.2 GB, 2,035× TS2859 0.032 s / 35 MB, no errors

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
…re-instantiation key

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@typescript-automation typescript-automation Bot added For Uncommitted Bug PR for untriaged, rejected, closed or missing bug and removed For Milestone Bug PRs that fix a bug with a specific milestone labels Nov 18, 2026
… another of its own type parameters

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@RyanCavanaugh Ryan Cavanaugh (RyanCavanaugh) changed the title [WIP] Report TypeScript bug with aliased Partial duplication Cache homomorphic mapped type constituent instantiations under their re-instantiation key Nov 18, 2026
@RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh) marked this pull request as ready for review November 18, 2026 17:18
Copilot AI balanced review requested due to automatic review settings November 18, 2026 17:18
@RyanCavanaugh

Copy link
Copy Markdown
Member Author

TypeScript Bot (@typescript-bot) test it

@typescript-automation

typescript-automation Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

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

Command Status Results
test top400 ✅ Started ✅ Results
user test this ✅ Started ✅ Results
run dt ✅ Started ✅ 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.

🔵 Needs a closer look

Changes to shared compiler type-identity caching and recursive mapper behavior require maintainer review and full compiler/conformance baseline validation unavailable in this environment.

No open issues 🎉

What changed in this PR

Addresses #65560 by caching homomorphic mapped-type constituents under their re-instantiation keys, preventing duplicate union members, quadratic inference work, and spurious TS2859 errors.

Changes:

  • Reuses cached constituent instantiations while preserving alias handling.
  • Skips caching when overlapping type-parameter mappings would produce an inconsistent cache entry.
  • Adds regression tests for aliases, union arguments, the 4,000-key reproduction, and recursive overlapping parameters.
File Description
tsc/​testdata/​tests/​cases/​compiler/​homomorphicMappedTypeReinstantiationOverlappingParameters.ts Tests recursive mappings with overlapping parameters.
tsc/​testdata/​tests/​cases/​compiler/​homomorphicMappedTypeReinstantiationLargeUnion.ts Covers the 4,000-key TS2859 reproduction.
tsc/​testdata/​tests/​cases/​compiler/​homomorphicMappedTypeReinstantiation.ts Tests deduplication across mapped types, unions, and aliases.
tsc/​testdata/​baselines/​reference/​compiler/​homomorphicMappedTypeReinstantiationOverlappingParameters.types Records expected recursive mapping types.
tsc/​testdata/​baselines/​reference/​compiler/​homomorphicMappedTypeReinstantiationOverlappingParameters.symbols Records overlapping-parameter symbol bindings.
tsc/​testdata/​baselines/​reference/​compiler/​homomorphicMappedTypeReinstantiation.types Records deduplicated inferred types.
tsc/​testdata/​baselines/​reference/​compiler/​homomorphicMappedTypeReinstantiation.symbols Records symbol bindings for deduplication tests.
tsc/​internal/​checker/​checker.go Adds guarded caching for mapped-type constituent instantiations.

Review effort: Balanced

@typescript-automation

Copy link
Copy Markdown
Contributor

Hey Ryan Cavanaugh (@RyanCavanaugh), the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-automation

Copy link
Copy Markdown
Contributor

Ryan Cavanaugh (@RyanCavanaugh) Here are the results of running the user tests with tsc comparing baseline and pr:

Everything looks good!

@typescript-automation

Copy link
Copy Markdown
Contributor

Ryan Cavanaugh (@RyanCavanaugh) Here are the results of running the top 400 repos with tsc comparing baseline and pr:

Everything looks good!

@typescript-automation

Copy link
Copy Markdown
Contributor

Ryan Cavanaugh (@RyanCavanaugh), the perf run you requested failed. You can check the log here.

@RyanCavanaugh

Copy link
Copy Markdown
Member Author

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

@typescript-automation

typescript-automation Bot commented Nov 18, 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

@DanielRosenwasser

Copy link
Copy Markdown
Member

Okay but why weren't the types reduced on union construction?

@typescript-automation

Copy link
Copy Markdown
Contributor

Ryan Cavanaugh (@RyanCavanaugh)
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=40
Symbols 88,381 88,381 ~ ~ ~ p=1.000 n=40
Types 79,508 79,508 ~ ~ ~ p=1.000 n=40
Memory Used 106,397k (± 0.02%) 106,379k (± 0.02%) ~ 106,195k 106,541k p=0.452 n=40
Memory Allocs 1,060,105 (± 0.01%) 1,060,064 (± 0.01%) ~ 1,059,245 1,060,635 p=0.675 n=40
Config Time 0.000s 0.000s (±196.00%) ~ 0.000s 0.001s p=0.330 n=40
Parse Time 0.023s (± 2.06%) 0.024s (± 6.90%) ~ 0.019s 0.056s p=0.228 n=40
Bind Time 0.009s (± 3.25%) 0.009s (± 3.96%) ~ 0.007s 0.013s p=0.722 n=40
Check Time 0.218s (± 0.83%) 0.218s (± 0.84%) ~ 0.207s 0.235s p=0.442 n=40
Emit Time 0.144s (± 0.81%) 0.145s (± 0.92%) ~ 0.135s 0.156s p=0.606 n=40
Total Time 0.398s (± 0.66%) 0.399s (± 0.85%) ~ 0.375s 0.441s p=0.571 n=40
angular-1 - native
Errors 63 63 ~ ~ ~ p=1.000 n=40
Symbols 754,008 753,863 -145 (- 0.02%) ~ ~ p=0.000 n=40
Types 548,695 548,545 -150 (- 0.03%) ~ ~ p=0.000 n=40
Memory Used 643,203k (± 0.01%) 643,183k (± 0.01%) ~ 642,444k 643,876k p=0.931 n=40
Memory Allocs 8,329,516 (± 0.03%) 8,331,832 (± 0.06%) ~ 8,322,421 8,397,379 p=0.685 n=40
Config Time 0.007s (± 1.81%) 0.007s (± 1.88%) ~ 0.006s 0.008s p=0.583 n=40
Parse Time 0.122s (± 2.59%) 0.122s (± 2.28%) ~ 0.107s 0.158s p=1.000 n=40
Bind Time 0.042s (± 7.33%) 0.041s (± 6.49%) ~ 0.033s 0.065s p=0.787 n=40
Check Time 0.639s (± 0.91%) 0.636s (± 0.89%) ~ 0.604s 0.682s p=0.167 n=40
Emit Time 0.398s (± 0.63%) 0.396s (± 0.50%) ~ 0.380s 0.411s p=0.296 n=40
Total Time 1.222s (± 0.44%) 1.217s (± 0.44%) ~ 1.190s 1.262s p=0.058 n=40
arktype - native
Errors 0 0 ~ ~ ~ p=1.000 n=40
Symbols 676,938 676,621 -317 (- 0.05%) ~ ~ p=0.000 n=40
Types 937,070 936,967 -103 (- 0.01%) ~ ~ p=0.000 n=40
Memory Used 473,708k (± 0.01%) 473,637k (± 0.01%) -74k (- 0.02%) 473,380k 473,875k p=0.011 n=40
Memory Allocs 11,819,865 (± 0.01%) 11,818,750 (± 0.02%) ~ 11,813,090 11,841,991 p=0.170 n=40
Config Time 0.001s 0.001s ~ ~ ~ p=1.000 n=40
Parse Time 0.040s (± 2.56%) 0.041s (± 2.39%) ~ 0.036s 0.049s p=0.204 n=40
Bind Time 0.013s (± 5.85%) 0.013s (± 5.77%) ~ 0.011s 0.020s p=0.290 n=40
Check Time 0.844s (± 0.53%) 0.846s (± 0.67%) ~ 0.808s 0.905s p=0.267 n=40
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=40
Total Time 0.924s (± 0.48%) 0.928s (± 0.62%) ~ 0.895s 0.990s p=0.210 n=40
class-transformer - native
Errors 0 0 ~ ~ ~ p=1.000 n=40
Symbols 45,376 45,376 ~ ~ ~ p=1.000 n=40
Types 7,573 7,573 ~ ~ ~ p=1.000 n=40
Memory Used 27,745k (± 0.02%) 27,740k (± 0.02%) ~ 27,695k 27,774k p=0.157 n=40
Memory Allocs 232,151 (± 0.04%) 232,199 (± 0.04%) ~ 231,777 232,994 p=0.350 n=40
Config Time 0.001s 0.001s ~ ~ ~ p=1.000 n=40
Parse Time 0.010s (± 4.37%) 0.010s (± 8.44%) ~ 0.007s 0.027s p=0.896 n=40
Bind Time 0.003s (± 8.65%) 0.003s (± 7.79%) ~ 0.002s 0.005s p=0.145 n=40
Check Time 0.008s (± 4.29%) 0.008s (± 3.66%) ~ 0.006s 0.010s p=0.402 n=40
Emit Time 0.007s (± 5.45%) 0.007s (± 4.48%) ~ 0.006s 0.009s p=0.810 n=40
Total Time 0.030s (± 2.38%) 0.029s (± 3.66%) ~ 0.026s 0.049s p=0.290 n=40
effect - native
Errors 12 12 ~ ~ ~ p=1.000 n=40
Symbols 1,234,359 1,234,348 -11 (- 0.00%) ~ ~ p=0.000 n=40
Types 893,315 893,242 -73 (- 0.01%) ~ ~ p=0.000 n=40
Memory Used 941,297k (± 0.01%) 941,195k (± 0.01%) ~ 940,420k 942,078k p=0.307 n=40
Memory Allocs 11,753,060 (± 0.02%) 11,756,095 (± 0.04%) ~ 11,739,671 11,824,331 p=0.413 n=40
Config Time 0.002s (± 0.58%) 0.002s (± 6.89%) ~ 0.002s 0.005s p=1.000 n=40
Parse Time 0.149s (± 1.29%) 0.147s (± 1.24%) ~ 0.133s 0.164s p=0.083 n=40
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=40
Check Time 0.885s (± 0.70%) 0.885s (± 0.93%) ~ 0.848s 0.981s p=0.929 n=40
Emit Time 0.469s (± 1.16%) 0.475s (± 1.30%) ~ 0.418s 0.515s p=0.112 n=40
Total Time 1.597s (± 0.41%) 1.602s (± 0.48%) ~ 1.537s 1.672s p=0.259 n=40
mui-docs - native
Errors 11,405 11,405 ~ ~ ~ p=1.000 n=40
Symbols 3,730,768 3,692,413 -38,355 (- 1.03%) ~ ~ p=0.000 n=40
Types 1,354,170 1,353,089 -1,081 (- 0.08%) ~ ~ p=0.000 n=40
Memory Used 1,667,667k (± 0.05%) 1,658,042k (± 0.05%) -9,380k (- 0.56%) 1,651,988k 1,662,152k p=0.000 n=40
Memory Allocs 25,147,739 (± 0.04%) 25,129,740 (± 0.05%) -18,356 (- 0.07%) 25,055,841 25,291,794 p=0.034 n=40
Config Time 0.006s (± 2.23%) 0.006s (± 2.40%) ~ 0.006s 0.007s p=0.501 n=40
Parse Time 0.277s (± 1.87%) 0.277s (± 1.85%) ~ 0.249s 0.323s p=0.831 n=40
Bind Time 0.001s (± 8.56%) 0.001s (± 8.56%) ~ 0.001s 0.002s p=1.000 n=40
Check Time 2.887s (± 0.49%) 2.893s (± 0.61%) ~ 2.763s 3.008s p=0.627 n=40
Emit Time 0.258s (± 2.29%) 0.254s (± 0.66%) ~ 0.241s 0.266s p=0.422 n=40
Total Time 3.923s (± 0.44%) 3.922s (± 0.52%) ~ 3.751s 4.058s p=0.837 n=40
sentry - native
Errors 1 1 ~ ~ ~ p=1.000 n=40
Symbols 4,782,800 4,779,165 -3,635 (- 0.08%) ~ ~ p=0.000 n=40
Types 2,605,443 2,605,247 -196 (- 0.01%) ~ ~ p=0.000 n=40
Memory Used 2,798,073k (± 0.02%) 2,797,338k (± 0.02%) ~ 2,794,087k 2,802,020k p=0.232 n=40
Memory Allocs 74,592,231 (± 0.07%) 74,560,955 (± 0.06%) ~ 74,264,341 74,796,013 p=0.590 n=40
Config Time 0.018s (± 1.63%) 0.018s (± 3.68%) ~ 0.017s 0.031s p=0.396 n=40
Parse Time 0.476s (± 3.93%) 0.484s (± 4.43%) ~ 0.413s 0.678s p=0.921 n=40
Bind Time 0.148s (± 6.80%) 0.144s (± 6.07%) ~ 0.117s 0.217s p=0.691 n=40
Check Time 6.584s (± 0.82%) 6.522s (± 0.56%) -0.046s (- 0.69%) 6.355s 6.906s p=0.031 n=40
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=40
Total Time 7.277s (± 0.80%) 7.219s (± 0.65%) ~ 7.014s 7.756s p=0.150 n=40
social-app - native
Errors 0 0 ~ ~ ~ p=1.000 n=40
Symbols 1,872,618 1,838,934 -33,684 (- 1.80%) ~ ~ p=0.000 n=40
Types 1,150,836 1,148,165 -2,671 (- 0.23%) ~ ~ p=0.000 n=40
Memory Used 948,624k (± 0.01%) 939,298k (± 0.01%) -9,321k (- 0.98%) 938,021k 940,286k p=0.000 n=40
Memory Allocs 13,412,629 (± 0.09%) 13,305,028 (± 0.10%) -107,402 (- 0.80%) 13,251,434 13,504,488 p=0.000 n=40
Config Time 0.006s (± 2.17%) 0.006s (± 1.95%) ~ 0.005s 0.006s p=0.299 n=40
Parse Time 0.152s (± 3.07%) 0.153s (± 2.08%) ~ 0.137s 0.180s p=0.542 n=40
Bind Time 0.045s (± 6.94%) 0.042s (± 5.33%) ~ 0.035s 0.068s p=0.248 n=40
Check Time 1.432s (± 0.65%) 1.410s (± 0.78%) -0.024s (- 1.67%) 1.346s 1.522s p=0.003 n=40
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=40
Total Time 1.655s (± 0.60%) 1.630s (± 0.72%) -0.026s (- 1.54%) 1.566s 1.749s p=0.001 n=40
strada-build-src - native
Errors 0 0 ~ ~ ~ p=1.000 n=40
Symbols 1,183,341 1,182,450 -891 (- 0.08%) ~ ~ p=0.000 n=40
Types 437,605 437,531 -74 (- 0.02%) ~ ~ p=0.000 n=40
Memory Used 1,155,569k (± 0.15%) 1,155,982k (± 0.22%) ~ 1,142,739k 1,178,897k p=0.973 n=40
Memory Allocs 40,058,020 (± 0.06%) 40,060,486 (± 0.06%) ~ 39,927,493 40,233,276 p=0.572 n=40
Config Time 0.002s (±12.33%) 0.002s (± 9.00%) ~ 0.001s 0.003s p=0.069 n=40
Parse Time 0.136s (± 1.30%) 0.136s (± 1.12%) ~ 0.126s 0.146s p=0.867 n=40
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=40
Check Time 0.807s (± 0.95%) 0.806s (± 0.75%) ~ 0.762s 0.844s p=0.910 n=40
Emit Time 0.136s (± 1.10%) 0.138s (± 1.43%) ~ 0.130s 0.160s p=0.312 n=40
Total Time 9.333s (± 0.75%) 9.337s (± 0.65%) ~ 8.839s 9.679s p=0.510 n=40
strada-compiler - native
Errors 0 0 ~ ~ ~ p=1.000 n=40
Symbols 262,982 262,140 -842 (- 0.32%) ~ ~ p=0.000 n=40
Types 195,974 195,922 -52 (- 0.03%) ~ ~ p=0.000 n=40
Memory Used 221,428k (± 0.02%) 221,240k (± 0.02%) -192k (- 0.09%) 220,965k 221,469k p=0.000 n=40
Memory Allocs 1,911,731 (± 0.01%) 1,910,719 (± 0.01%) -1,001 (- 0.05%) 1,909,176 1,911,944 p=0.000 n=40
Config Time 0.000s (±42.25%) 0.000s (±40.27%) ~ 0.000s 0.002s p=0.785 n=40
Parse Time 0.050s (± 1.73%) 0.049s (± 2.04%) ~ 0.044s 0.057s p=0.365 n=40
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=40
Check Time 0.381s (± 0.55%) 0.384s (± 0.90%) ~ 0.369s 0.426s p=0.178 n=40
Emit Time 0.046s (± 3.61%) 0.047s (± 3.35%) ~ 0.041s 0.062s p=0.456 n=40
Total Time 0.504s (± 0.63%) 0.509s (± 0.67%) ~ 0.492s 0.541s p=0.054 n=40
t3code-server - native
Errors 0 0 ~ ~ ~ p=1.000 n=40
Symbols 4,345,071 4,344,901 -170 (- 0.00%) ~ ~ p=0.000 n=40
Types 3,040,936 3,040,823 -113 (- 0.00%) ~ ~ p=0.000 n=40
Memory Used 2,393,662k (± 0.02%) 2,393,846k (± 0.02%) ~ 2,391,886k 2,398,842k p=0.806 n=40
Memory Allocs 37,040,015 (± 0.03%) 37,032,982 (± 0.03%) ~ 36,965,937 37,129,275 p=0.405 n=40
Config Time 0.003s (± 6.15%) 0.003s (± 5.97%) ~ 0.002s 0.003s p=0.582 n=40
Parse Time 0.249s (± 2.13%) 0.244s (± 1.46%) ~ 0.222s 0.273s p=0.108 n=40
Bind Time 0.092s (± 7.36%) 0.089s (± 6.11%) ~ 0.073s 0.143s p=0.905 n=40
Check Time 5.817s (± 0.47%) 5.845s (± 0.56%) +0.032s (+ 0.54%) 5.648s 6.096s p=0.050 n=40
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=40
Total Time 6.172s (± 0.43%) 6.193s (± 0.53%) ~ 6.007s 6.446s p=0.101 n=40
tanstack-router - native
Errors 1 1 ~ ~ ~ p=1.000 n=40
Symbols 568,576 567,192 -1,384 (- 0.24%) ~ ~ p=0.000 n=40
Types 396,130 396,109 -21 (- 0.01%) ~ ~ p=0.000 n=40
Memory Used 315,047k (± 0.01%) 314,787k (± 0.01%) -267k (- 0.08%) 314,486k 315,025k p=0.000 n=40
Memory Allocs 4,164,547 (± 0.08%) 4,160,063 (± 0.10%) -4,339 (- 0.10%) 4,150,901 4,233,905 p=0.001 n=40
Config Time 0.001s (± 4.68%) 0.001s (± 0.39%) ~ 0.001s 0.001s p=1.000 n=40
Parse Time 0.046s (± 2.67%) 0.044s (± 3.99%) ~ 0.034s 0.070s p=0.054 n=40
Bind Time 0.016s (± 7.50%) 0.015s (± 9.03%) ~ 0.011s 0.035s p=0.820 n=40
Check Time 0.522s (± 0.84%) 0.525s (± 0.86%) ~ 0.492s 0.563s p=0.142 n=40
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=40
Total Time 0.603s (± 0.82%) 0.604s (± 0.91%) ~ 0.560s 0.652s p=0.826 n=40
ts-pre-modules - native
Errors 87 87 ~ ~ ~ p=1.000 n=40
Symbols 231,156 230,298 -858 (- 0.37%) ~ ~ p=0.000 n=40
Types 181,003 180,947 -56 (- 0.03%) ~ ~ p=0.000 n=40
Memory Used 190,763k (± 0.01%) 190,585k (± 0.01%) -178k (- 0.09%) 190,359k 190,773k p=0.000 n=40
Memory Allocs 1,307,112 (± 0.01%) 1,306,123 (± 0.01%) -1,025 (- 0.08%) 1,305,408 1,307,376 p=0.000 n=40
Config Time 0.000s 0.000s (±196.00%) ~ 0.000s 0.001s p=0.330 n=40
Parse Time 0.042s (± 1.76%) 0.043s (± 3.48%) ~ 0.038s 0.068s p=0.606 n=40
Bind Time 0.020s (± 4.23%) 0.020s (± 3.98%) ~ 0.015s 0.026s p=0.948 n=40
Check Time 0.293s (± 1.19%) 0.293s (± 1.09%) ~ 0.275s 0.337s p=0.681 n=40
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=40
Total Time 0.362s (± 0.95%) 0.362s (± 1.06%) ~ 0.343s 0.412s p=0.550 n=40
vscode - native
Errors 0 0 ~ ~ ~ p=1.000 n=40
Symbols 8,565,123 (± 0.00%) 8,558,864 (± 0.00%) -6,259 (- 0.07%) 8,558,705 8,559,022 p=0.000 n=40
Types 4,990,013 (± 0.00%) 4,986,621 (± 0.00%) -3,392 (- 0.07%) 4,986,416 4,986,825 p=0.000 n=40
Memory Used 5,716,132k (± 0.01%) 5,714,043k (± 0.01%) -2,023k (- 0.04%) 5,709,635k 5,720,888k p=0.000 n=40
Memory Allocs 63,831,510 (± 0.01%) 63,807,668 (± 0.01%) -22,274 (- 0.03%) 63,780,479 63,926,549 p=0.000 n=40
Config Time 0.024s (± 2.68%) 0.023s (± 0.69%) 0.000s ( 0.00%) 0.023s 0.024s p=0.009 n=40
Parse Time 0.945s (± 1.32%) 0.939s (± 1.00%) ~ 0.882s 1.041s p=0.390 n=40
Bind Time 0.328s (± 3.88%) 0.321s (± 4.14%) ~ 0.293s 0.573s p=0.542 n=40
Check Time 7.943s (± 0.73%) 7.978s (± 0.49%) ~ 7.718s 8.321s p=0.354 n=40
Emit Time 2.427s (± 4.56%) 2.471s (± 3.90%) ~ 2.076s 3.105s p=0.476 n=40
Total Time 11.728s (± 0.98%) 11.794s (± 0.91%) ~ 11.128s 12.625s p=0.527 n=40
webpack - native
Errors 637 637 ~ ~ ~ p=1.000 n=40
Symbols 919,410 919,244 -166 (- 0.02%) ~ ~ p=0.000 n=40
Types 643,434 643,366 -68 (- 0.01%) ~ ~ p=0.000 n=40
Memory Used 734,807k (± 0.01%) 734,819k (± 0.01%) ~ 734,335k 735,325k p=0.715 n=40
Memory Allocs 6,384,152 (± 0.05%) 6,390,893 (± 0.15%) ~ 6,369,519 6,554,919 p=0.675 n=40
Config Time 0.003s (± 2.24%) 0.003s (± 2.24%) ~ 0.003s 0.004s p=0.577 n=40
Parse Time 0.131s (± 2.59%) 0.132s (± 2.81%) ~ 0.112s 0.181s p=0.548 n=40
Bind Time 0.046s (± 7.15%) 0.043s (± 5.76%) ~ 0.034s 0.065s p=0.143 n=40
Check Time 1.642s (± 0.74%) 1.652s (± 0.89%) ~ 1.585s 1.742s p=0.283 n=40
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=40
Total Time 1.847s (± 0.68%) 1.854s (± 0.85%) ~ 1.771s 1.942s p=0.656 n=40
xstate-main - native
Errors 1 1 ~ ~ ~ p=1.000 n=40
Symbols 4,048,047 4,045,150 -2,897 (- 0.07%) ~ ~ p=0.000 n=40
Types 4,184,629 4,182,665 -1,964 (- 0.05%) ~ ~ p=0.000 n=40
Memory Used 2,227,462k (± 0.00%) 2,226,420k (± 0.01%) -1,049k (- 0.05%) 2,225,665k 2,227,547k p=0.000 n=40
Memory Allocs 45,076,341 (± 0.00%) 45,067,895 (± 0.01%) -8,318 (- 0.02%) 45,050,492 45,091,378 p=0.000 n=40
Config Time 0.002s 0.002s ~ ~ ~ p=1.000 n=40
Parse Time 0.108s (± 1.87%) 0.108s (± 1.92%) ~ 0.098s 0.129s p=0.773 n=40
Bind Time 0.040s (± 6.79%) 0.040s (± 6.25%) ~ 0.034s 0.061s p=0.957 n=40
Check Time 4.388s (± 0.56%) 4.406s (± 0.66%) ~ 4.282s 4.785s p=0.112 n=40
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=40
Total Time 4.546s (± 0.57%) 4.564s (± 0.67%) ~ 4.441s 4.965s p=0.118 n=40
System info unknown
Hosts
  • native
Scenarios
  • Compiler-Unions - native
  • angular-1 - native
  • arktype - native
  • class-transformer - native
  • effect - native
  • mui-docs - native
  • sentry - native
  • social-app - native
  • strada-build-src - native
  • strada-compiler - native
  • t3code-server - native
  • tanstack-router - native
  • ts-pre-modules - native
  • vscode - native
  • webpack - native
  • xstate-main - native
Benchmark Name Iterations
Current pr 20
Baseline baseline 20

Developer Information:

Download Benchmarks

@github-project-automation github-project-automation Bot moved this from Not started to Needs merge in PR Backlog Nov 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 19, 2026
@jakebailey

Copy link
Copy Markdown
Member

This needs a merge from main and baseline reaccept

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e5f9f6f-490e-46f9-bc3a-de0bb1d6728f
Regenerate compiler baselines for the homomorphic mapped type cache change.

Validation: npx hereby validate --all; compiler baselines, API tests, lint, and formatting passed. Two Windows symlink-watcher tests failed because this process lacks symlink privileges.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e5f9f6f-490e-46f9-bc3a-de0bb1d6728f
@jakebailey
Jake Bailey (jakebailey) added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit 58fb153 Nov 19, 2026
34 checks passed
@jakebailey
Jake Bailey (jakebailey) deleted the copilot/report-typescript-bug branch November 19, 2026 23:06
@github-project-automation github-project-automation Bot moved this from Needs merge to Done in PR Backlog Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Aliased Partial<{ … }> is duplicated when instantiated again: quadratic inference, spurious TS2859, repeated union members

6 participants