Skip to content

Conversation

ahejlsberg
Copy link
Member

@ahejlsberg ahejlsberg commented Oct 15, 2025

This PR implements proper propagation of the VarianceFlags.Unreliable flag. See discussion here.

Initially this PR propagated both VarianceFlags.Unreliable and VarianceFlags.Unmeasurable, but this had pretty severe effects on the xstate project that we use in our performance benchmarks. It likely would affect other projects in a similar manner. It is no big surprise since flagging variance as unmeasurable causes us to pretty much always perform structural comparisons. The PR now only propagates VarianceFlags.Unreliable, which fixes the reported issue and has an insignificant effect on performance (check time increases ~1% for xstate).

Fixes #62606.

@Copilot Copilot AI review requested due to automatic review settings October 15, 2025 14:37
@github-project-automation github-project-automation bot moved this to Not started in PR Backlog Oct 15, 2025
@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Oct 15, 2025
@ahejlsberg
Copy link
Member Author

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 15, 2025

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

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Introduces variance reliability propagation in the type checker and updates related test baselines to reflect new performance characteristics.

  • Adds early instantiation/reporting for unmeasurable/unreliable variance flags in the checker.
  • Updates an existing baseline with higher instantiation count and adds performance stats to another baseline file.
  • Refactors placement of source/target extraction (s/t) outside a conditional.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/compiler/checker.ts Adds propagation of variance reliability flags and moves s/t extraction earlier.
tests/baselines/reference/deeplyNestedMappedTypes.types Updates expected instantiation count (performance metric change).
tests/baselines/reference/circularlySimplifyingConditionalTypesNoCrash.types Adds new performance stats section to the baseline.
Comments suppressed due to low confidence (2)

src/compiler/checker.ts:1

  • [nitpick] The return value of instantiateType is ignored; if this call is made purely for its side-effect (invoking the mapper callback), add a clarifying comment or explicitly discard with void to document intent and prevent future refactors from mistakenly removing it.
import {

src/compiler/checker.ts:1

  • instantiateType is invoked even when the variance later proves to be Independent (the subsequent branch skips all work for independent parameters); consider deferring this call until after confirming variance !== VarianceFlags.Independent to avoid unnecessary instantiation overhead.
import {

//// [tests/cases/compiler/deeplyNestedMappedTypes.ts] ////

=== Performance Stats ===
Type Count: 1,000
Copy link

Copilot AI Oct 15, 2025

Choose a reason for hiding this comment

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

Instantiation count increased from 5,000 to 25,000; please confirm this regression is intentional or add justification/mitigation (e.g. a note in the PR or follow-up optimization plan) since this may impact compile performance.

Suggested change
Type Count: 1,000
Type Count: 1,000
// NOTE: High instantiation count is intentional for this test case.
// This test is designed to stress-test recursive mapped types (see #55535).

Copilot uses AI. Check for mistakes.

@typescript-bot
Copy link
Collaborator

Hey @ahejlsberg, the results of running the DT tests are ready.

There were interesting changes:

Branch only errors:

Package: raphael
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/raphael/test/raphael-tests-api.ts
  1476:19  error  TypeScript@local compile error: 
Type instantiation is excessively deep and possibly infinite  @definitelytyped/expect

✖ 1 problem (1 error, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.34_typescript@6.0.0-dev.20251015/node_modules/@definitelytyped/dtslint/dist/index.js:199:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.34_typescript@6.0.0-dev.20251015/node_modules/@definitelytyped/dtslint/dist/index.js:191:20)

You can check the log here.

@typescript-bot
Copy link
Collaborator

@ahejlsberg Here are the results of running the user tests with tsc comparing main and refs/pull/62604/merge:

There were infrastructure failures potentially unrelated to your change:

  • 1 instance of "Git clone failed"

Otherwise...

Everything looks good!

@typescript-bot
Copy link
Collaborator

@ahejlsberg
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 - node (v18.15.0, x64)
Errors 34 34 ~ ~ ~ p=1.000 n=6
Symbols 62,370 62,370 ~ ~ ~ p=1.000 n=6
Types 50,386 50,386 ~ ~ ~ p=1.000 n=6
Memory used 193,960k (± 0.98%) 195,151k (± 0.96%) ~ 192,727k 196,416k p=0.575 n=6
Parse Time 1.30s (± 0.63%) 1.30s (± 0.63%) ~ 1.29s 1.31s p=1.000 n=6
Bind Time 0.72s (± 0.57%) 0.72s ~ ~ ~ p=0.405 n=6
Check Time 9.76s (± 0.33%) 9.74s (± 0.22%) ~ 9.71s 9.77s p=0.289 n=6
Emit Time 2.76s (± 0.94%) 2.74s (± 0.43%) ~ 2.73s 2.76s p=0.411 n=6
Total Time 14.54s (± 0.34%) 14.51s (± 0.19%) ~ 14.48s 14.56s p=0.169 n=6
angular-1 - node (v18.15.0, x64)
Errors 2 2 ~ ~ ~ p=1.000 n=6
Symbols 955,117 956,037 +920 (+ 0.10%) ~ ~ p=0.001 n=6
Types 415,619 415,880 +261 (+ 0.06%) ~ ~ p=0.001 n=6
Memory used 1,254,587k (± 0.01%) 1,255,037k (± 0.00%) +450k (+ 0.04%) 1,254,944k 1,255,115k p=0.005 n=6
Parse Time 6.50s (± 0.79%) 6.52s (± 0.62%) ~ 6.48s 6.58s p=0.421 n=6
Bind Time 1.88s (± 0.40%) 1.88s ~ ~ ~ p=0.598 n=6
Check Time 32.17s (± 0.17%) 32.13s (± 0.21%) ~ 32.02s 32.22s p=0.294 n=6
Emit Time 14.81s (± 0.47%) 14.91s (± 0.39%) ~ 14.83s 14.98s p=0.054 n=6
Total Time 55.36s (± 0.13%) 55.44s (± 0.22%) ~ 55.27s 55.57s p=0.173 n=6
mui-docs - node (v18.15.0, x64)
Errors 1 1 ~ ~ ~ p=1.000 n=6
Symbols 552,211 552,211 ~ ~ ~ p=1.000 n=6
Types 89 89 ~ ~ ~ p=1.000 n=6
Memory used 826,857k (± 0.00%) 826,860k (± 0.00%) ~ 826,853k 826,866k p=0.936 n=6
Parse Time 8.60s (± 0.28%) 8.58s (± 0.23%) ~ 8.55s 8.60s p=0.115 n=6
Bind Time 2.19s (± 0.62%) 2.19s (± 0.53%) ~ 2.17s 2.20s p=0.931 n=6
Check Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Emit Time 0.27s (± 2.80%) 0.27s (± 3.06%) ~ 0.26s 0.28s p=0.729 n=6
Total Time 11.06s (± 0.29%) 11.04s (± 0.19%) ~ 11.01s 11.06s p=0.331 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,237,230 1,237,230 ~ ~ ~ p=1.000 n=6
Types 259,856 259,856 ~ ~ ~ p=1.000 n=6
Memory used 2,425,835k (± 6.12%) 2,364,758k (± 0.02%) ~ 2,364,259k 2,365,619k p=0.128 n=6
Parse Time 5.13s (± 0.66%) 5.13s (± 1.03%) ~ 5.06s 5.18s p=0.872 n=6
Bind Time 1.78s (± 0.55%) 1.77s (± 0.85%) ~ 1.76s 1.80s p=0.404 n=6
Check Time 35.04s (± 0.49%) 35.08s (± 0.10%) ~ 35.02s 35.11s p=0.810 n=6
Emit Time 3.04s (± 1.25%) 3.02s (± 1.38%) ~ 2.94s 3.05s p=0.872 n=6
Total Time 44.98s (± 0.37%) 45.00s (± 0.14%) ~ 44.88s 45.06s p=1.000 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,237,230 1,237,230 ~ ~ ~ p=1.000 n=6
Types 259,856 259,856 ~ ~ ~ p=1.000 n=6
Memory used 3,158,966k (± 0.03%) 3,158,677k (± 0.01%) ~ 3,158,274k 3,159,373k p=0.689 n=6
Parse Time 6.89s (± 0.77%) 6.84s (± 0.91%) ~ 6.76s 6.94s p=0.199 n=6
Bind Time 2.17s (± 1.30%) 2.17s (± 1.15%) ~ 2.14s 2.20s p=0.872 n=6
Check Time 42.47s (± 0.41%) 42.62s (± 0.12%) ~ 42.58s 42.69s p=0.128 n=6
Emit Time 3.52s (± 2.01%) 3.55s (± 1.10%) ~ 3.52s 3.62s p=0.521 n=6
Total Time 55.06s (± 0.39%) 55.16s (± 0.16%) ~ 55.04s 55.26s p=0.575 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 262,534 262,534 ~ ~ ~ p=1.000 n=6
Types 104,035 104,035 ~ ~ ~ p=1.000 n=6
Memory used 440,643k (± 0.01%) 440,675k (± 0.01%) ~ 440,603k 440,755k p=0.229 n=6
Parse Time 3.51s (± 1.51%) 3.50s (± 0.61%) ~ 3.47s 3.53s p=1.000 n=6
Bind Time 1.32s (± 0.88%) 1.32s (± 1.31%) ~ 1.29s 1.34s p=0.934 n=6
Check Time 18.99s (± 0.28%) 18.91s (± 0.27%) -0.08s (- 0.40%) 18.86s 19.00s p=0.030 n=6
Emit Time 1.52s (± 1.20%) 1.54s (± 1.12%) ~ 1.52s 1.56s p=0.144 n=6
Total Time 25.34s (± 0.40%) 25.28s (± 0.20%) ~ 25.20s 25.34s p=0.295 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 72 72 ~ ~ ~ p=1.000 n=6
Symbols 225,367 225,367 ~ ~ ~ p=1.000 n=6
Types 94,290 94,290 ~ ~ ~ p=1.000 n=6
Memory used 370,022k (± 0.04%) 370,112k (± 0.06%) ~ 369,940k 370,490k p=0.575 n=6
Parse Time 2.83s (± 0.83%) 2.86s (± 0.99%) ~ 2.83s 2.90s p=0.050 n=6
Bind Time 1.60s (± 0.64%) 1.61s (± 1.08%) ~ 1.59s 1.64s p=0.276 n=6
Check Time 16.44s (± 0.40%) 16.45s (± 0.61%) ~ 16.30s 16.59s p=0.936 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 20.86s (± 0.39%) 20.92s (± 0.51%) ~ 20.77s 21.08s p=0.261 n=6
vscode - node (v18.15.0, x64)
Errors 5 5 ~ ~ ~ p=1.000 n=6
Symbols 3,941,290 3,941,290 ~ ~ ~ p=1.000 n=6
Types 1,236,978 1,236,982 +4 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 3,733,392k (± 0.01%) 3,733,729k (± 0.00%) +337k (+ 0.01%) 3,733,679k 3,733,807k p=0.005 n=6
Parse Time 15.16s (± 0.53%) 15.18s (± 0.80%) ~ 15.07s 15.39s p=1.000 n=6
Bind Time 4.99s (± 0.94%) 4.96s (± 0.43%) ~ 4.93s 4.98s p=0.171 n=6
Check Time 103.01s (± 2.30%) 106.89s (± 2.90%) +3.88s (+ 3.77%) 101.25s 109.49s p=0.031 n=6
Emit Time 35.66s (±10.63%) 34.16s (±14.10%) ~ 30.94s 42.53s p=0.810 n=6
Total Time 158.82s (± 1.19%) 161.19s (± 2.50%) ~ 157.54s 169.03s p=0.298 n=6
webpack - node (v18.15.0, x64)
Errors 40 40 ~ ~ ~ p=1.000 n=6
Symbols 372,646 372,646 ~ ~ ~ p=1.000 n=6
Types 163,205 163,205 ~ ~ ~ p=1.000 n=6
Memory used 529,057k (± 0.01%) 529,082k (± 0.01%) ~ 529,004k 529,162k p=0.378 n=6
Parse Time 4.50s (± 0.61%) 4.51s (± 0.98%) ~ 4.45s 4.58s p=0.571 n=6
Bind Time 1.93s (± 1.00%) 1.91s (± 0.85%) ~ 1.89s 1.94s p=0.101 n=6
Check Time 22.20s (± 0.43%) 22.17s (± 0.29%) ~ 22.10s 22.27s p=0.470 n=6
Emit Time 0.00s (±244.70%) 0.00s (±244.70%) ~ 0.00s 0.01s p=1.000 n=6
Total Time 28.63s (± 0.36%) 28.61s (± 0.24%) ~ 28.51s 28.68s p=0.470 n=6
xstate-main - node (v18.15.0, x64)
Errors 30 111 🔻+81 (+270.00%) ~ ~ p=0.001 n=6
Symbols 674,800 1,015,472 🔻+340,672 (+50.48%) ~ ~ p=0.001 n=6
Types 202,613 297,282 🔻+94,669 (+46.72%) ~ ~ p=0.001 n=6
Memory used 576,901k (± 0.03%) 762,872k (± 0.01%) 🔻+185,971k (+32.24%) 762,772k 762,998k p=0.005 n=6
Parse Time 4.17s (± 0.58%) 4.18s (± 0.45%) ~ 4.15s 4.20s p=0.622 n=6
Bind Time 1.35s (± 1.73%) 1.34s (± 1.10%) ~ 1.33s 1.36s p=0.742 n=6
Check Time 20.66s (± 1.59%) 26.61s (± 0.43%) 🔻+5.95s (+28.82%) 26.47s 26.80s p=0.005 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 26.17s (± 1.26%) 32.13s (± 0.31%) 🔻+5.95s (+22.75%) 32.01s 32.29s p=0.005 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-build-src-public-api - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@typescript-bot
Copy link
Collaborator

@ahejlsberg Here are the results of running the top 400 repos with tsc comparing main and refs/pull/62604/merge:

Everything looks good!

@ahejlsberg
Copy link
Member Author

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 15, 2025

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

@typescript-bot
Copy link
Collaborator

Hey @ahejlsberg, the results of running the DT tests are ready.

There were interesting changes:

Branch only errors:

Package: raphael
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/raphael/test/raphael-tests-api.ts
  1476:19  error  TypeScript@local compile error: 
Type instantiation is excessively deep and possibly infinite  @definitelytyped/expect

✖ 1 problem (1 error, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.34_typescript@6.0.0-dev.20251015/node_modules/@definitelytyped/dtslint/dist/index.js:199:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.34_typescript@6.0.0-dev.20251015/node_modules/@definitelytyped/dtslint/dist/index.js:191:20)

You can check the log here.

@typescript-bot
Copy link
Collaborator

@ahejlsberg Here are the results of running the user tests with tsc comparing main and refs/pull/62604/merge:

There were infrastructure failures potentially unrelated to your change:

  • 1 instance of "Git clone failed"

Otherwise...

Everything looks good!

@typescript-bot
Copy link
Collaborator

@ahejlsberg
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 - node (v18.15.0, x64)
Errors 34 34 ~ ~ ~ p=1.000 n=6
Symbols 62,370 62,370 ~ ~ ~ p=1.000 n=6
Types 50,386 50,386 ~ ~ ~ p=1.000 n=6
Memory used 194,562k (± 1.02%) 193,385k (± 0.81%) ~ 192,731k 196,573k p=0.230 n=6
Parse Time 1.30s (± 0.40%) 1.30s (± 0.42%) ~ 1.30s 1.31s p=0.640 n=6
Bind Time 0.72s (± 0.71%) 0.72s ~ ~ ~ p=0.174 n=6
Check Time 9.77s (± 0.46%) 9.78s (± 0.15%) ~ 9.75s 9.79s p=1.000 n=6
Emit Time 2.75s (± 0.50%) 2.74s (± 0.75%) ~ 2.72s 2.78s p=0.326 n=6
Total Time 14.55s (± 0.29%) 14.55s (± 0.18%) ~ 14.52s 14.59s p=0.807 n=6
angular-1 - node (v18.15.0, x64)
Errors 2 2 ~ ~ ~ p=1.000 n=6
Symbols 955,117 956,037 +920 (+ 0.10%) ~ ~ p=0.001 n=6
Types 415,619 415,880 +261 (+ 0.06%) ~ ~ p=0.001 n=6
Memory used 1,254,568k (± 0.00%) 1,255,023k (± 0.01%) +456k (+ 0.04%) 1,254,935k 1,255,124k p=0.005 n=6
Parse Time 6.49s (± 0.63%) 6.53s (± 0.61%) ~ 6.48s 6.58s p=0.063 n=6
Bind Time 1.88s (± 0.22%) 1.88s (± 0.29%) ~ 1.88s 1.89s p=0.054 n=6
Check Time 32.20s (± 0.34%) 32.19s (± 0.07%) ~ 32.17s 32.22s p=0.936 n=6
Emit Time 14.87s (± 0.16%) 14.94s (± 0.26%) +0.07s (+ 0.45%) 14.88s 14.99s p=0.010 n=6
Total Time 55.43s (± 0.21%) 55.55s (± 0.13%) ~ 55.46s 55.64s p=0.065 n=6
mui-docs - node (v18.15.0, x64)
Errors 1 1 ~ ~ ~ p=1.000 n=6
Symbols 552,211 552,211 ~ ~ ~ p=1.000 n=6
Types 89 89 ~ ~ ~ p=1.000 n=6
Memory used 826,845k (± 0.00%) 826,848k (± 0.00%) ~ 826,831k 826,874k p=0.688 n=6
Parse Time 8.58s (± 0.25%) 8.58s (± 0.34%) ~ 8.54s 8.62s p=1.000 n=6
Bind Time 2.19s (± 0.19%) 2.18s (± 0.47%) ~ 2.17s 2.19s p=0.461 n=6
Check Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Emit Time 0.27s (± 3.31%) 0.27s (± 2.98%) ~ 0.26s 0.28s p=0.550 n=6
Total Time 11.04s (± 0.23%) 11.04s (± 0.30%) ~ 10.99s 11.09s p=0.936 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,237,230 1,237,230 ~ ~ ~ p=1.000 n=6
Types 259,856 259,856 ~ ~ ~ p=1.000 n=6
Memory used 2,667,910k (±13.40%) 2,486,181k (±11.94%) ~ 2,364,545k 3,092,844k p=0.378 n=6
Parse Time 5.17s (± 1.25%) 5.17s (± 1.23%) ~ 5.11s 5.29s p=0.936 n=6
Bind Time 1.78s (± 1.84%) 1.77s (± 0.66%) ~ 1.75s 1.78s p=0.332 n=6
Check Time 35.12s (± 1.00%) 35.14s (± 0.50%) ~ 34.95s 35.47s p=1.000 n=6
Emit Time 2.99s (± 1.43%) 3.02s (± 1.25%) ~ 2.96s 3.06s p=0.335 n=6
Total Time 45.06s (± 0.82%) 45.10s (± 0.57%) ~ 44.87s 45.58s p=0.688 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,237,230 1,237,230 ~ ~ ~ p=1.000 n=6
Types 259,856 259,856 ~ ~ ~ p=1.000 n=6
Memory used 3,158,717k (± 0.04%) 3,159,030k (± 0.02%) ~ 3,158,277k 3,159,580k p=1.000 n=6
Parse Time 6.82s (± 0.55%) 6.74s (± 1.08%) ~ 6.65s 6.84s p=0.077 n=6
Bind Time 2.15s (± 1.20%) 2.11s (± 1.17%) -0.04s (- 1.93%) 2.08s 2.15s p=0.035 n=6
Check Time 42.48s (± 0.18%) 42.44s (± 0.46%) ~ 42.27s 42.69s p=0.471 n=6
Emit Time 3.53s (± 2.21%) 3.48s (± 1.78%) ~ 3.41s 3.56s p=0.298 n=6
Total Time 54.98s (± 0.25%) 54.80s (± 0.38%) ~ 54.53s 55.09s p=0.173 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 262,534 262,534 ~ ~ ~ p=1.000 n=6
Types 104,035 104,035 ~ ~ ~ p=1.000 n=6
Memory used 440,675k (± 0.01%) 440,665k (± 0.02%) ~ 440,606k 440,805k p=0.378 n=6
Parse Time 3.53s (± 0.77%) 3.53s (± 1.10%) ~ 3.48s 3.59s p=0.936 n=6
Bind Time 1.31s (± 1.25%) 1.33s (± 0.67%) ~ 1.32s 1.34s p=0.084 n=6
Check Time 19.02s (± 0.36%) 19.05s (± 0.70%) ~ 18.93s 19.31s p=0.810 n=6
Emit Time 1.52s (± 0.34%) 1.53s (± 1.13%) ~ 1.50s 1.55s p=0.113 n=6
Total Time 25.39s (± 0.28%) 25.43s (± 0.57%) ~ 25.35s 25.73s p=0.574 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 72 72 ~ ~ ~ p=1.000 n=6
Symbols 225,367 225,367 ~ ~ ~ p=1.000 n=6
Types 94,290 94,290 ~ ~ ~ p=1.000 n=6
Memory used 370,220k (± 0.07%) 370,149k (± 0.04%) ~ 369,965k 370,428k p=0.810 n=6
Parse Time 2.83s (± 0.61%) 2.85s (± 0.29%) ~ 2.84s 2.86s p=0.120 n=6
Bind Time 1.60s (± 1.87%) 1.60s (± 1.08%) ~ 1.57s 1.62s p=1.000 n=6
Check Time 16.51s (± 0.19%) 16.49s (± 0.26%) ~ 16.40s 16.51s p=0.743 n=6
Emit Time 0.00s (±244.70%) 0.00s ~ ~ ~ p=0.405 n=6
Total Time 20.94s (± 0.34%) 20.94s (± 0.23%) ~ 20.85s 20.99s p=0.810 n=6
vscode - node (v18.15.0, x64)
Errors 5 5 ~ ~ ~ p=1.000 n=6
Symbols 3,940,422 3,940,422 ~ ~ ~ p=1.000 n=6
Types 1,236,857 1,236,857 ~ ~ ~ p=1.000 n=6
Memory used 3,733,294k (± 0.00%) 3,733,202k (± 0.01%) ~ 3,732,852k 3,733,603k p=0.230 n=6
Parse Time 15.19s (± 0.46%) 15.26s (± 0.71%) ~ 15.10s 15.40s p=0.378 n=6
Bind Time 4.96s (± 0.88%) 4.99s (± 0.58%) ~ 4.95s 5.03s p=0.416 n=6
Check Time 105.42s (± 4.23%) 102.80s (± 2.22%) ~ 100.71s 106.85s p=0.378 n=6
Emit Time 38.84s (±13.37%) 36.39s (± 8.57%) ~ 31.10s 38.83s p=0.230 n=6
Total Time 164.41s (± 3.79%) 159.43s (± 1.38%) ~ 156.04s 162.38s p=0.298 n=6
webpack - node (v18.15.0, x64)
Errors 40 40 ~ ~ ~ p=1.000 n=6
Symbols 372,646 372,646 ~ ~ ~ p=1.000 n=6
Types 163,205 163,205 ~ ~ ~ p=1.000 n=6
Memory used 529,044k (± 0.02%) 529,086k (± 0.01%) ~ 528,983k 529,148k p=0.521 n=6
Parse Time 4.50s (± 0.69%) 4.48s (± 0.66%) ~ 4.43s 4.52s p=0.226 n=6
Bind Time 1.94s (± 2.24%) 1.92s (± 1.04%) ~ 1.90s 1.95s p=0.332 n=6
Check Time 22.14s (± 0.26%) 22.12s (± 0.27%) ~ 22.05s 22.19s p=0.333 n=6
Emit Time 0.00s (±244.70%) 0.00s (±244.70%) ~ 0.00s 0.01s p=1.000 n=6
Total Time 28.58s (± 0.28%) 28.53s (± 0.16%) ~ 28.46s 28.59s p=0.172 n=6
xstate-main - node (v18.15.0, x64)
Errors 30 30 ~ ~ ~ p=1.000 n=6
Symbols 674,800 682,418 +7,618 (+ 1.13%) ~ ~ p=0.001 n=6
Types 202,613 204,696 +2,083 (+ 1.03%) ~ ~ p=0.001 n=6
Memory used 577,011k (± 0.02%) 580,912k (± 0.02%) +3,901k (+ 0.68%) 580,791k 581,018k p=0.005 n=6
Parse Time 4.20s (± 0.72%) 4.19s (± 0.54%) ~ 4.17s 4.23s p=0.870 n=6
Bind Time 1.34s (± 0.77%) 1.36s (± 1.08%) ~ 1.34s 1.38s p=0.084 n=6
Check Time 20.39s (± 1.49%) 20.63s (± 1.75%) +0.24s (+ 1.18%) 20.36s 21.12s p=0.044 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 25.93s (± 1.15%) 26.18s (± 1.42%) ~ 25.91s 26.67s p=0.092 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-build-src-public-api - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@typescript-bot
Copy link
Collaborator

@ahejlsberg Here are the results of running the top 400 repos with tsc comparing main and refs/pull/62604/merge:

Everything looks good!

@ahejlsberg
Copy link
Member Author

Only two things to note from tests. First, check time for xstate increases by about 1%. Second, one new error the DT raphael package. I think both of these are acceptable.

For background, the error in raphael is caused by the RaphaelPaperPluginMethodOrRegistry and RaphaelPaperPluginRegistry types recursing infinitely when passed a recursive type such as IDBValidKey defined in the DOM:

type IDBValidKey = number | string | Date | BufferSource | IDBValidKey[];

I suppose the additional structural checking caused by propagation of VarianceFlags.Unreliable is causing this. In any case, it's an error waiting to happen, and the RaphaelPaperPluginMethodOrRegistry conditional type ought to make provisions for bailing out on array types.

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: Not started

Development

Successfully merging this pull request may close these issues.

Changing property declaration order causes error

2 participants