Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make enum literal type identical to the union of its values #60417

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

MichaelMitchell-at
Copy link

@MichaelMitchell-at MichaelMitchell-at commented Nov 4, 2024

Passes all existing test cases and Airtable codebase ("Identicality" checks are probably quite rare so unsurprising). Creating this in the hopes that we can use the test infra on this repo to run this against the corpus of other open source libraries.

  • There is an associated issue in the Backlog milestone (required)
  • Code is up-to-date with the main branch
  • You've successfully run hereby runtests locally
  • There are new or updated unit tests validating the change

Fixes mmkal/expect-type#33
Fixes #46112

@typescript-bot typescript-bot added the For Backlog Bug PRs that fix a backlog bug label Nov 4, 2024
@jakebailey
Copy link
Member

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 4, 2024

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

Command Status Results
test top400 ✅ Started ✅ Results
user test this ✅ Started
run dt ✅ Started ✅ Results
perf test this faster ✅ Started 👀 Results

@typescript-bot
Copy link
Collaborator

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

Everything looks the same!

You can check the log here.

@typescript-bot
Copy link
Collaborator

@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 - node (v18.15.0, x64)
Errors 31 31 ~ ~ ~ p=1.000 n=6
Symbols 62,340 62,340 ~ ~ ~ p=1.000 n=6
Types 50,379 50,379 ~ ~ ~ p=1.000 n=6
Memory used 193,873k (± 0.88%) 194,655k (± 0.97%) ~ 192,775k 196,452k p=0.423 n=6
Parse Time 1.31s (± 1.15%) 1.31s (± 0.57%) ~ 1.30s 1.32s p=1.000 n=6
Bind Time 0.72s 0.72s ~ ~ ~ p=1.000 n=6
Check Time 9.76s (± 0.52%) 9.78s (± 0.44%) ~ 9.73s 9.85s p=1.000 n=6
Emit Time 2.69s (± 1.16%) 2.73s (± 0.44%) +0.04s (+ 1.55%) 2.72s 2.75s p=0.011 n=6
Total Time 14.48s (± 0.41%) 14.54s (± 0.24%) ~ 14.51s 14.60s p=0.076 n=6
angular-1 - node (v18.15.0, x64)
Errors 33 33 ~ ~ ~ p=1.000 n=6
Symbols 947,888 947,888 ~ ~ ~ p=1.000 n=6
Types 410,840 410,840 ~ ~ ~ p=1.000 n=6
Memory used 1,224,605k (± 0.00%) 1,224,595k (± 0.00%) ~ 1,224,534k 1,224,688k p=0.575 n=6
Parse Time 6.67s (± 0.53%) 6.66s (± 0.72%) ~ 6.60s 6.73s p=0.688 n=6
Bind Time 1.88s (± 0.52%) 1.88s (± 0.73%) ~ 1.86s 1.89s p=1.000 n=6
Check Time 31.86s (± 0.30%) 31.83s (± 0.30%) ~ 31.71s 31.99s p=0.513 n=6
Emit Time 15.23s (± 0.15%) 15.20s (± 0.23%) ~ 15.16s 15.25s p=0.127 n=6
Total Time 55.63s (± 0.16%) 55.56s (± 0.24%) ~ 55.37s 55.78s p=0.296 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,495,004 2,495,004 ~ ~ ~ p=1.000 n=6
Types 908,592 908,592 ~ ~ ~ p=1.000 n=6
Memory used 2,307,259k (± 0.00%) 2,307,279k (± 0.00%) ~ 2,307,224k 2,307,321k p=0.810 n=6
Parse Time 9.33s (± 0.30%) 9.34s (± 0.31%) ~ 9.31s 9.38s p=0.285 n=6
Bind Time 2.14s (± 0.62%) 2.14s (± 0.42%) ~ 2.13s 2.15s p=0.801 n=6
Check Time 75.20s (± 0.38%) 75.17s (± 0.38%) ~ 74.72s 75.49s p=0.575 n=6
Emit Time 0.28s (± 2.95%) 0.28s (± 3.91%) ~ 0.27s 0.30s p=0.666 n=6
Total Time 86.95s (± 0.30%) 86.93s (± 0.30%) ~ 86.54s 87.28s p=0.630 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,258,544 1,258,544 ~ ~ ~ p=1.000 n=6
Types 266,358 266,358 ~ ~ ~ p=1.000 n=6
Memory used 2,423,697k (± 0.04%) 2,423,206k (± 0.02%) ~ 2,422,483k 2,423,878k p=0.471 n=6
Parse Time 5.18s (± 1.00%) 5.24s (± 0.69%) +0.05s (+ 1.06%) 5.19s 5.27s p=0.045 n=6
Bind Time 1.93s (± 0.64%) 1.93s (± 0.42%) ~ 1.92s 1.94s p=0.730 n=6
Check Time 35.61s (± 0.51%) 35.67s (± 0.24%) ~ 35.53s 35.75s p=0.173 n=6
Emit Time 2.97s (± 1.29%) 3.04s (± 1.37%) +0.07s (+ 2.30%) 2.99s 3.09s p=0.031 n=6
Total Time 45.71s (± 0.29%) 45.89s (± 0.23%) ~ 45.75s 46.02s p=0.066 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,258,544 1,258,544 ~ ~ ~ p=1.000 n=6
Types 266,358 266,358 ~ ~ ~ p=1.000 n=6
Memory used 2,740,838k (±13.54%) 2,620,230k (±11.21%) ~ 2,499,888k 3,220,339k p=0.128 n=6
Parse Time 6.70s (± 2.72%) 6.63s (± 1.92%) ~ 6.52s 6.88s p=0.378 n=6
Bind Time 2.14s (± 0.97%) 2.15s (± 1.54%) ~ 2.09s 2.18s p=0.419 n=6
Check Time 43.20s (± 0.37%) 43.24s (± 0.42%) ~ 43.04s 43.45s p=0.936 n=6
Emit Time 3.59s (± 3.41%) 3.49s (± 2.84%) ~ 3.40s 3.64s p=0.173 n=6
Total Time 55.62s (± 0.50%) 55.52s (± 0.36%) ~ 55.24s 55.79s p=0.471 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 261,751 261,751 ~ ~ ~ p=1.000 n=6
Types 106,472 106,472 ~ ~ ~ p=1.000 n=6
Memory used 438,832k (± 0.02%) 438,869k (± 0.01%) ~ 438,840k 438,928k p=0.575 n=6
Parse Time 3.53s (± 1.05%) 3.53s (± 1.13%) ~ 3.48s 3.58s p=1.000 n=6
Bind Time 1.32s (± 0.80%) 1.31s (± 1.15%) ~ 1.28s 1.32s p=0.406 n=6
Check Time 18.94s (± 0.73%) 18.91s (± 0.45%) ~ 18.82s 19.07s p=0.575 n=6
Emit Time 1.53s (± 1.20%) 1.53s (± 0.90%) ~ 1.52s 1.56s p=0.323 n=6
Total Time 25.32s (± 0.47%) 25.29s (± 0.29%) ~ 25.19s 25.39s p=0.521 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 68 68 ~ ~ ~ p=1.000 n=6
Symbols 225,921 225,921 ~ ~ ~ p=1.000 n=6
Types 94,415 94,415 ~ ~ ~ p=1.000 n=6
Memory used 371,112k (± 0.01%) 371,155k (± 0.03%) ~ 371,084k 371,360k p=0.575 n=6
Parse Time 2.92s (± 0.79%) 2.92s (± 1.03%) ~ 2.88s 2.95s p=1.000 n=6
Bind Time 1.59s (± 0.79%) 1.59s (± 1.22%) ~ 1.57s 1.62s p=0.743 n=6
Check Time 16.39s (± 0.41%) 16.36s (± 0.40%) ~ 16.32s 16.49s p=0.422 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 20.90s (± 0.29%) 20.86s (± 0.38%) ~ 20.77s 21.00s p=0.377 n=6
vscode - node (v18.15.0, x64)
Errors 3 3 ~ ~ ~ p=1.000 n=6
Symbols 3,132,185 3,132,185 ~ ~ ~ p=1.000 n=6
Types 1,079,657 1,079,657 ~ ~ ~ p=1.000 n=6
Memory used 3,220,886k (± 0.01%) 3,221,007k (± 0.02%) ~ 3,220,269k 3,221,489k p=0.471 n=6
Parse Time 14.07s (± 0.28%) 14.07s (± 0.41%) ~ 14.01s 14.15s p=0.936 n=6
Bind Time 4.49s (± 2.34%) 4.51s (± 2.50%) ~ 4.44s 4.74s p=0.261 n=6
Check Time 85.75s (± 1.27%) 87.33s (± 3.02%) ~ 84.96s 91.71s p=0.575 n=6
Emit Time 26.74s (± 1.97%) 26.12s (± 6.58%) ~ 22.91s 27.38s p=0.936 n=6
Total Time 131.04s (± 0.95%) 132.04s (± 1.57%) ~ 129.10s 134.27s p=0.297 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 288,119 288,119 ~ ~ ~ p=1.000 n=6
Types 116,928 116,928 ~ ~ ~ p=1.000 n=6
Memory used 439,437k (± 0.02%) 439,407k (± 0.01%) ~ 439,342k 439,497k p=0.261 n=6
Parse Time 4.04s (± 0.88%) 4.07s (± 1.00%) ~ 4.02s 4.12s p=0.373 n=6
Bind Time 1.74s (± 1.39%) 1.74s (± 1.88%) ~ 1.70s 1.77s p=0.806 n=6
Check Time 18.63s (± 0.27%) 18.57s (± 0.24%) ~ 18.51s 18.62s p=0.054 n=6
Emit Time 0.00s (±244.70%) 0.00s ~ ~ ~ p=0.405 n=6
Total Time 24.41s (± 0.21%) 24.38s (± 0.30%) ~ 24.27s 24.46s p=0.466 n=6
xstate-main - node (v18.15.0, x64)
Errors 3 3 ~ ~ ~ p=1.000 n=6
Symbols 543,132 543,132 ~ ~ ~ p=1.000 n=6
Types 181,889 181,889 ~ ~ ~ p=1.000 n=6
Memory used 485,538k (± 0.01%) 485,499k (± 0.01%) ~ 485,449k 485,538k p=0.230 n=6
Parse Time 3.36s (± 0.64%) 3.42s (± 3.94%) ~ 3.32s 3.69s p=0.469 n=6
Bind Time 1.17s (± 1.62%) 1.19s (± 4.04%) ~ 1.15s 1.28s p=0.743 n=6
Check Time 19.14s (± 0.33%) 19.19s (± 0.32%) ~ 19.10s 19.26s p=0.171 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 23.68s (± 0.25%) 23.81s (± 0.75%) ~ 23.61s 24.14s p=0.109 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

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

Everything looks good!

@MichaelMitchell-at MichaelMitchell-at changed the title [work in progress] Make enum literal type identical to the union of its values Make enum literal type identical to the union of its values Nov 5, 2024
Copy link
Author

@MichaelMitchell-at MichaelMitchell-at left a comment

Choose a reason for hiding this comment

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

Updated the implementation so that the logic happens in normalization. Formally requesting review for this now.

src/compiler/checker.ts Outdated Show resolved Hide resolved
@MichaelMitchell-at
Copy link
Author

@jakebailey would you mind kicking off tests again?

@jakebailey
Copy link
Member

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 5, 2024

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

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

Everything looks good!

@typescript-bot
Copy link
Collaborator

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

Everything looks the same!

You can check the log here.

@typescript-bot
Copy link
Collaborator

@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 - node (v18.15.0, x64)
Errors 31 31 ~ ~ ~ p=1.000 n=6
Symbols 62,340 62,340 ~ ~ ~ p=1.000 n=6
Types 50,379 50,448 +69 (+ 0.14%) ~ ~ p=0.001 n=6
Memory used 192,852k (± 0.07%) 193,601k (± 0.73%) +749k (+ 0.39%) 192,862k 196,468k p=0.020 n=6
Parse Time 1.30s (± 0.94%) 1.31s (± 0.92%) ~ 1.29s 1.32s p=0.300 n=6
Bind Time 0.72s 0.72s ~ ~ ~ p=1.000 n=6
Check Time 9.76s (± 0.50%) 10.30s (± 0.45%) 🔻+0.54s (+ 5.57%) 10.21s 10.34s p=0.005 n=6
Emit Time 2.70s (± 1.23%) 2.74s (± 0.72%) +0.04s (+ 1.48%) 2.71s 2.76s p=0.029 n=6
Total Time 14.48s (± 0.33%) 15.07s (± 0.37%) 🔻+0.59s (+ 4.09%) 14.97s 15.13s p=0.005 n=6
angular-1 - node (v18.15.0, x64)
Errors 33 33 ~ ~ ~ p=1.000 n=6
Symbols 947,888 947,888 ~ ~ ~ p=1.000 n=6
Types 410,840 410,977 +137 (+ 0.03%) ~ ~ p=0.001 n=6
Memory used 1,224,601k (± 0.00%) 1,224,672k (± 0.00%) +71k (+ 0.01%) 1,224,621k 1,224,730k p=0.030 n=6
Parse Time 6.66s (± 0.61%) 6.67s (± 0.92%) ~ 6.59s 6.74s p=0.936 n=6
Bind Time 1.88s (± 0.40%) 1.88s (± 0.43%) ~ 1.87s 1.89s p=0.306 n=6
Check Time 31.88s (± 0.44%) 31.94s (± 0.28%) ~ 31.81s 32.04s p=0.520 n=6
Emit Time 15.20s (± 0.47%) 15.20s (± 0.32%) ~ 15.15s 15.26s p=0.872 n=6
Total Time 55.62s (± 0.25%) 55.69s (± 0.19%) ~ 55.55s 55.84s p=0.296 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,495,217 2,495,217 ~ ~ ~ p=1.000 n=6
Types 908,767 908,769 +2 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,307,392k (± 0.00%) 2,307,415k (± 0.00%) ~ 2,307,394k 2,307,435k p=0.173 n=6
Parse Time 9.35s (± 0.34%) 9.32s (± 0.23%) ~ 9.28s 9.34s p=0.063 n=6
Bind Time 2.14s (± 0.57%) 2.14s (± 0.42%) ~ 2.13s 2.15s p=0.557 n=6
Check Time 75.06s (± 0.32%) 75.18s (± 0.30%) ~ 74.86s 75.46s p=0.521 n=6
Emit Time 0.28s 0.28s (± 4.15%) ~ 0.27s 0.30s p=1.000 n=6
Total Time 86.82s (± 0.29%) 86.92s (± 0.25%) ~ 86.64s 87.20s p=0.575 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,258,544 1,258,544 ~ ~ ~ p=1.000 n=6
Types 266,358 266,650 +292 (+ 0.11%) ~ ~ p=0.001 n=6
Memory used 2,423,180k (± 0.03%) 2,424,071k (± 0.02%) +891k (+ 0.04%) 2,423,535k 2,424,713k p=0.045 n=6
Parse Time 5.21s (± 0.64%) 5.24s (± 0.31%) ~ 5.21s 5.26s p=0.108 n=6
Bind Time 1.92s (± 0.51%) 1.92s (± 0.71%) ~ 1.90s 1.94s p=0.607 n=6
Check Time 35.69s (± 0.44%) 37.89s (± 0.33%) 🔻+2.20s (+ 6.17%) 37.76s 38.10s p=0.005 n=6
Emit Time 3.06s (± 4.71%) 3.02s (± 1.34%) ~ 2.98s 3.07s p=1.000 n=6
Total Time 45.90s (± 0.32%) 48.07s (± 0.26%) 🔻+2.18s (+ 4.75%) 47.91s 48.26s p=0.005 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,258,544 1,258,544 ~ ~ ~ p=1.000 n=6
Types 266,358 266,650 +292 (+ 0.11%) ~ ~ p=0.001 n=6
Memory used 2,620,373k (±11.19%) 2,621,164k (±11.21%) ~ 2,500,059k 3,221,627k p=0.689 n=6
Parse Time 6.62s (± 2.59%) 6.64s (± 2.81%) ~ 6.46s 7.00s p=0.573 n=6
Bind Time 2.15s (± 1.94%) 2.16s (± 1.19%) ~ 2.12s 2.19s p=0.873 n=6
Check Time 43.25s (± 0.33%) 46.04s (± 0.35%) 🔻+2.79s (+ 6.45%) 45.80s 46.19s p=0.005 n=6
Emit Time 3.52s (± 1.67%) 3.65s (± 5.58%) ~ 3.46s 3.90s p=0.378 n=6
Total Time 55.54s (± 0.51%) 58.50s (± 0.75%) 🔻+2.96s (+ 5.33%) 57.90s 59.02s p=0.005 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 261,751 261,751 ~ ~ ~ p=1.000 n=6
Types 106,472 106,587 +115 (+ 0.11%) ~ ~ p=0.001 n=6
Memory used 438,842k (± 0.01%) 438,918k (± 0.02%) +76k (+ 0.02%) 438,842k 439,034k p=0.030 n=6
Parse Time 3.56s (± 0.63%) 3.53s (± 0.90%) ~ 3.50s 3.58s p=0.145 n=6
Bind Time 1.31s (± 1.50%) 1.31s (± 0.79%) ~ 1.30s 1.33s p=0.328 n=6
Check Time 18.96s (± 0.32%) 20.50s (± 0.35%) 🔻+1.54s (+ 8.11%) 20.37s 20.56s p=0.005 n=6
Emit Time 1.53s (± 0.89%) 1.54s (± 0.89%) ~ 1.52s 1.56s p=0.217 n=6
Total Time 25.35s (± 0.26%) 26.89s (± 0.19%) 🔻+1.53s (+ 6.05%) 26.81s 26.96s p=0.005 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 68 68 ~ ~ ~ p=1.000 n=6
Symbols 225,921 225,921 ~ ~ ~ p=1.000 n=6
Types 94,415 94,514 +99 (+ 0.10%) ~ ~ p=0.001 n=6
Memory used 371,089k (± 0.01%) 371,258k (± 0.01%) +169k (+ 0.05%) 371,195k 371,286k p=0.005 n=6
Parse Time 2.91s (± 0.86%) 2.91s (± 1.25%) ~ 2.85s 2.95s p=1.000 n=6
Bind Time 1.58s (± 1.03%) 1.61s (± 1.15%) +0.04s (+ 2.33%) 1.59s 1.64s p=0.012 n=6
Check Time 16.39s (± 0.27%) 18.00s (± 0.27%) 🔻+1.61s (+ 9.84%) 17.92s 18.07s p=0.005 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 20.88s (± 0.18%) 22.53s (± 0.19%) 🔻+1.65s (+ 7.89%) 22.47s 22.59s p=0.005 n=6
vscode - node (v18.15.0, x64)
Errors 3 3 ~ ~ ~ p=1.000 n=6
Symbols 3,133,416 3,133,416 ~ ~ ~ p=1.000 n=6
Types 1,080,118 1,080,641 +523 (+ 0.05%) ~ ~ p=0.001 n=6
Memory used 3,221,982k (± 0.01%) 3,224,628k (± 0.01%) +2,646k (+ 0.08%) 3,224,106k 3,224,959k p=0.005 n=6
Parse Time 14.10s (± 0.34%) 14.13s (± 0.55%) ~ 14.06s 14.26s p=0.629 n=6
Bind Time 4.60s (± 3.23%) 4.67s (± 2.48%) ~ 4.44s 4.75s p=0.871 n=6
Check Time 86.55s (± 3.17%) 87.33s (± 1.90%) ~ 85.12s 89.33s p=0.229 n=6
Emit Time 26.52s (± 7.99%) 26.10s (± 6.87%) ~ 23.28s 27.66s p=0.471 n=6
Total Time 131.76s (± 2.14%) 132.25s (± 2.24%) ~ 128.62s 135.23s p=1.000 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 288,119 288,119 ~ ~ ~ p=1.000 n=6
Types 116,928 116,928 ~ ~ ~ p=1.000 n=6
Memory used 439,470k (± 0.03%) 439,620k (± 0.03%) ~ 439,472k 439,802k p=0.066 n=6
Parse Time 5.05s (± 1.03%) 5.04s (± 0.50%) ~ 5.01s 5.07s p=0.573 n=6
Bind Time 2.16s (± 1.21%) 2.16s (± 1.42%) ~ 2.13s 2.21s p=0.872 n=6
Check Time 23.13s (± 0.50%) 23.19s (± 0.49%) ~ 23.04s 23.39s p=0.521 n=6
Emit Time 0.00s (±244.70%) 0.00s (±244.70%) ~ 0.00s 0.02s p=1.000 n=6
Total Time 30.33s (± 0.40%) 30.40s (± 0.50%) ~ 30.20s 30.66s p=0.470 n=6
xstate-main - node (v18.15.0, x64)
Errors 3 3 ~ ~ ~ p=1.000 n=6
Symbols 543,132 543,132 ~ ~ ~ p=1.000 n=6
Types 181,889 181,890 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 485,577k (± 0.02%) 485,507k (± 0.01%) ~ 485,459k 485,562k p=0.128 n=6
Parse Time 3.35s (± 0.88%) 3.36s (± 1.09%) ~ 3.31s 3.40s p=0.574 n=6
Bind Time 1.17s (± 1.00%) 1.17s (± 1.47%) ~ 1.15s 1.20s p=0.934 n=6
Check Time 19.12s (± 0.14%) 19.11s (± 0.29%) ~ 19.07s 19.21s p=0.413 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 23.64s (± 0.17%) 23.64s (± 0.29%) ~ 23.56s 23.75s p=1.000 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

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

Everything looks good!

@jakebailey
Copy link
Member

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 11, 2024

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

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

Everything looks good!

@typescript-bot
Copy link
Collaborator

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

Everything looks the same!

You can check the log here.

@typescript-bot
Copy link
Collaborator

@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 - node (v18.15.0, x64)
Errors 34 34 ~ ~ ~ p=1.000 n=6
Symbols 62,363 62,363 ~ ~ ~ p=1.000 n=6
Types 50,395 50,395 ~ ~ ~ p=1.000 n=6
Memory used 193,652k (± 0.78%) 193,635k (± 0.77%) ~ 192,993k 196,673k p=1.000 n=6
Parse Time 1.31s (± 0.84%) 1.31s (± 0.89%) ~ 1.29s 1.32s p=0.729 n=6
Bind Time 0.72s 0.72s ~ ~ ~ p=1.000 n=6
Check Time 9.82s (± 0.25%) 9.65s (± 0.29%) -0.17s (- 1.68%) 9.62s 9.69s p=0.005 n=6
Emit Time 2.73s (± 0.43%) 2.74s (± 0.61%) ~ 2.72s 2.76s p=0.410 n=6
Total Time 14.58s (± 0.19%) 14.42s (± 0.37%) -0.16s (- 1.06%) 14.35s 14.50s p=0.005 n=6
angular-1 - node (v18.15.0, x64)
Errors 37 37 ~ ~ ~ p=1.000 n=6
Symbols 947,936 947,936 ~ ~ ~ p=1.000 n=6
Types 410,955 410,955 ~ ~ ~ p=1.000 n=6
Memory used 1,226,045k (± 0.00%) 1,226,069k (± 0.00%) ~ 1,226,027k 1,226,134k p=0.378 n=6
Parse Time 6.62s (± 0.32%) 6.70s (± 0.68%) +0.08s (+ 1.16%) 6.64s 6.75s p=0.008 n=6
Bind Time 1.89s (± 0.40%) 1.89s (± 0.22%) ~ 1.88s 1.89s p=1.000 n=6
Check Time 32.00s (± 0.16%) 31.89s (± 0.51%) ~ 31.72s 32.06s p=0.470 n=6
Emit Time 15.24s (± 0.38%) 15.17s (± 0.12%) ~ 15.14s 15.19s p=0.086 n=6
Total Time 55.76s (± 0.16%) 55.65s (± 0.33%) ~ 55.46s 55.88s p=0.470 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,498,235 2,498,235 ~ ~ ~ p=1.000 n=6
Types 908,886 908,886 ~ ~ ~ p=1.000 n=6
Memory used 2,317,002k (± 0.00%) 2,317,056k (± 0.00%) +55k (+ 0.00%) 2,316,999k 2,317,096k p=0.031 n=6
Parse Time 9.32s (± 0.37%) 9.32s (± 0.29%) ~ 9.30s 9.36s p=0.684 n=6
Bind Time 2.17s (± 0.48%) 2.17s (± 0.45%) ~ 2.16s 2.18s p=0.673 n=6
Check Time 74.76s (± 0.43%) 74.64s (± 0.22%) ~ 74.45s 74.89s p=0.575 n=6
Emit Time 0.29s (± 4.22%) 0.29s (± 3.68%) ~ 0.27s 0.30s p=0.868 n=6
Total Time 86.54s (± 0.39%) 86.42s (± 0.18%) ~ 86.25s 86.66s p=0.575 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,225,389 1,225,398 +9 (+ 0.00%) ~ ~ p=0.001 n=6
Types 266,556 266,559 +3 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,354,499k (± 0.02%) 2,355,340k (± 0.03%) +841k (+ 0.04%) 2,354,545k 2,356,207k p=0.031 n=6
Parse Time 5.22s (± 0.79%) 5.26s (± 0.37%) ~ 5.22s 5.27s p=0.091 n=6
Bind Time 1.78s (± 0.69%) 1.78s (± 0.97%) ~ 1.75s 1.80s p=0.459 n=6
Check Time 35.29s (± 0.43%) 35.06s (± 0.24%) -0.23s (- 0.66%) 34.95s 35.16s p=0.024 n=6
Emit Time 2.98s (± 0.85%) 2.97s (± 1.22%) ~ 2.93s 3.03s p=0.423 n=6
Total Time 45.29s (± 0.38%) 45.07s (± 0.27%) -0.22s (- 0.49%) 44.91s 45.23s p=0.045 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,225,389 1,225,398 +9 (+ 0.00%) ~ ~ p=0.001 n=6
Types 266,556 266,559 +3 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 3,029,288k (± 9.80%) 3,150,547k (± 0.02%) ~ 3,149,636k 3,151,284k p=0.936 n=6
Parse Time 6.96s (± 1.69%) 7.03s (± 0.53%) ~ 6.98s 7.07s p=0.128 n=6
Bind Time 2.16s (± 1.69%) 2.11s (± 1.45%) ~ 2.07s 2.15s p=0.054 n=6
Check Time 42.83s (± 0.48%) 42.89s (± 0.22%) ~ 42.77s 43.00s p=0.688 n=6
Emit Time 3.47s (± 2.52%) 3.46s (± 2.11%) ~ 3.36s 3.57s p=1.000 n=6
Total Time 55.42s (± 0.39%) 55.48s (± 0.22%) ~ 55.32s 55.63s p=0.936 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 262,223 262,232 +9 (+ 0.00%) ~ ~ p=0.001 n=6
Types 106,607 106,610 +3 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 439,808k (± 0.02%) 439,941k (± 0.01%) +133k (+ 0.03%) 439,856k 440,015k p=0.013 n=6
Parse Time 3.55s (± 0.81%) 3.55s (± 0.79%) ~ 3.52s 3.59s p=0.872 n=6
Bind Time 1.32s (± 0.88%) 1.32s (± 0.75%) ~ 1.31s 1.33s p=0.673 n=6
Check Time 18.98s (± 0.29%) 18.96s (± 0.32%) ~ 18.88s 19.02s p=0.936 n=6
Emit Time 1.52s (± 0.90%) 1.54s (± 0.99%) ~ 1.51s 1.55s p=0.221 n=6
Total Time 25.38s (± 0.34%) 25.36s (± 0.25%) ~ 25.28s 25.41s p=1.000 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 70 70 ~ ~ ~ p=1.000 n=6
Symbols 226,062 226,062 ~ ~ ~ p=1.000 n=6
Types 94,488 94,488 ~ ~ ~ p=1.000 n=6
Memory used 371,629k (± 0.02%) 371,667k (± 0.01%) ~ 371,623k 371,720k p=0.199 n=6
Parse Time 2.91s (± 0.46%) 2.88s (± 0.94%) ~ 2.84s 2.92s p=0.052 n=6
Bind Time 1.59s (± 0.69%) 1.61s (± 0.55%) +0.02s (+ 1.26%) 1.60s 1.62s p=0.018 n=6
Check Time 16.52s (± 0.32%) 16.46s (± 0.30%) ~ 16.36s 16.50s p=0.088 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 21.03s (± 0.25%) 20.95s (± 0.32%) ~ 20.85s 21.03s p=0.077 n=6
vscode - node (v18.15.0, x64)
Errors 4 4 ~ ~ ~ p=1.000 n=6
Symbols 3,140,232 3,140,232 ~ ~ ~ p=1.000 n=6
Types 1,082,871 1,082,871 ~ ~ ~ p=1.000 n=6
Memory used 3,224,520k (± 0.01%) 3,224,712k (± 0.00%) ~ 3,224,611k 3,224,843k p=0.066 n=6
Parse Time 17.24s (± 0.44%) 17.25s (± 0.32%) ~ 17.16s 17.32s p=0.687 n=6
Bind Time 5.44s (± 0.27%) 5.48s (± 1.97%) ~ 5.42s 5.70s p=0.745 n=6
Check Time 104.34s (± 1.49%) 104.19s (± 1.50%) ~ 102.66s 107.20s p=1.000 n=6
Emit Time 29.39s (± 9.07%) 29.52s (± 8.98%) ~ 27.69s 32.98s p=0.298 n=6
Total Time 156.41s (± 2.38%) 156.45s (± 2.25%) ~ 154.12s 162.91s p=0.689 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 288,484 288,484 ~ ~ ~ p=1.000 n=6
Types 117,065 117,065 ~ ~ ~ p=1.000 n=6
Memory used 440,508k (± 0.04%) 440,571k (± 0.04%) ~ 440,259k 440,746k p=0.378 n=6
Parse Time 4.09s (± 1.32%) 4.08s (± 0.67%) ~ 4.04s 4.12s p=0.936 n=6
Bind Time 1.74s (± 2.24%) 1.76s (± 1.38%) ~ 1.71s 1.78s p=0.227 n=6
Check Time 18.82s (± 0.72%) 18.73s (± 0.87%) ~ 18.54s 19.02s p=0.422 n=6
Emit Time 0.00s 0.00s (±244.70%) ~ 0.00s 0.01s p=0.405 n=6
Total Time 24.66s (± 0.68%) 24.58s (± 0.61%) ~ 24.39s 24.85s p=0.575 n=6
xstate-main - node (v18.15.0, x64)
Errors 8 8 ~ ~ ~ p=1.000 n=6
Symbols 543,110 543,110 ~ ~ ~ p=1.000 n=6
Types 181,830 181,830 ~ ~ ~ p=1.000 n=6
Memory used 486,394k (± 0.03%) 486,421k (± 0.02%) ~ 486,206k 486,558k p=0.810 n=6
Parse Time 3.38s (± 0.79%) 3.35s (± 0.82%) ~ 3.33s 3.40s p=0.196 n=6
Bind Time 1.17s (± 0.88%) 1.17s (± 1.28%) ~ 1.15s 1.19s p=1.000 n=6
Check Time 19.54s (± 1.97%) 19.43s (± 0.91%) ~ 19.33s 19.79s p=0.748 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 24.09s (± 1.72%) 23.96s (± 0.75%) ~ 23.85s 24.32s p=0.422 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

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

Everything looks good!

Copy link
Author

@MichaelMitchell-at MichaelMitchell-at left a comment

Choose a reason for hiding this comment

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

Behavior and perf LGTM. Any more updates required on my side?

@lukesmurray
Copy link

@MichaelMitchell-at - saw this since I was part of the expect-type issue this fixes - is this proposed to be merged into typescript? or was this PR opened purely for testing purposes.

@MichaelMitchell-at
Copy link
Author

@MichaelMitchell-at - saw this since I was part of the expect-type issue this fixes - is this proposed to be merged into typescript? or was this PR opened purely for testing purposes.

Hopefully this can be merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Backlog Bug PRs that fix a backlog bug
Projects
Status: Not started
Development

Successfully merging this pull request may close these issues.

Unexpected error tests involving typescript enums + zod Broken equality between enum and union of its values
4 participants