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 4 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.

@@ -21573,6 +21573,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
const t = isFreshLiteralType(type) ? (type as FreshableType).regularType :
isGenericTupleType(type) ? getNormalizedTupleType(type, writing) :
getObjectFlags(type) & ObjectFlags.Reference ? (type as TypeReference).node ? createTypeReference((type as TypeReference).target, getTypeArguments(type as TypeReference)) : getSingleBaseForNonAugmentingSubtype(type) || type :
type.flags & TypeFlags.EnumLiteral && type.flags & TypeFlags.Union ? getUnionType((type as UnionType).types) :
Copy link
Author

@MichaelMitchell-at MichaelMitchell-at Nov 5, 2024

Choose a reason for hiding this comment

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

Not sure if I should cache the created type, e.g. type.resolvedReducedType || type.resolvedReducedType = getUnionType((type as UnionType).types).

Note that this must go above the next line, since getNormalizedUnionOrIntersectionType will just return back type, which will lead to the current iteration of the loop terminating.

@MichaelMitchell-at
Copy link
Author

@jakebailey would you mind kicking off tests again?

@@ -91,54 +95,58 @@ enumAssignmentCompat3.ts(87,1): error TS2322: Type 'First.E' is not assignable t
abc = secondAbcd; // missing 'd'
~~~
!!! error TS2322: Type 'Abcd.E' is not assignable to type 'First.E'.
!!! error TS2322: Property 'd' is missing in type 'First.E'.
!!! error TS2322: Type 'E.a' is not assignable to type 'E'.
Copy link
Member

Choose a reason for hiding this comment

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

This error seems super weird; makes me think the PR isn't quite right.

Copy link
Author

@MichaelMitchell-at MichaelMitchell-at Nov 5, 2024

Choose a reason for hiding this comment

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

I think this is the expected, but not necessarily the most desirable, outcome of the implementation. Abcd.E is now treated as the union of its constituents, which is Abcd.a | Abcd.b | Abcd.c | Abcd.d. When you try to assign the union to First.E, we check that every type in the union is assignable to First.E. Since Abcd.a is the first type in the union that's not assignable to First.E, it's the one we report in the diagnostic.

Copy link
Author

Choose a reason for hiding this comment

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

Actually looking at the other test cases I see that this is testing an existing behavior I wasn't aware of. If two enums are defined in different namespaces, have the same name, and have the same members, then the enums are mutually assignable. This is pretty strange to me but I'm sure there must be a reason if there are explicit tests for this behavior.

Copy link
Author

Choose a reason for hiding this comment

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

My first guess is that it means you can use enums defined in different versions of the same library interchangeably.

@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!

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
3 participants