Skip to content

Improve .origin preservation in getNarrowedTypeWorker #61589

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

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

Andarist
Copy link
Contributor

fixes #61581

@github-project-automation github-project-automation bot moved this to Not started in PR Backlog Apr 17, 2025
@typescript-bot typescript-bot added the For Backlog Bug PRs that fix a backlog bug label Apr 17, 2025
);
// If no constituents are directly related, create intersections for any generic constituents that
let matchedCandidates: Type[] = [];
let narrowedType = mapType(type, t =>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This whole change aims to avoid any major functional changes.

Conceptually, it just "flips" the order of the 2 nested for loops. Before candidates were iterated and that iteration was iterating through types. With this change, it's the other way around - types are iterated and they have an inner loop through candidates. This required some changes to pull this off (like the introduction of matchedCandidates).

But why this is even needed? The goal of this code is to narrow down a type by a candidate and to truly narrow down a type a mapType or filterType have to be used because they try to preserve .origin information. By having the outer loop mapping through candidate this "merely" produced a result related to type but not one that would directly be derived from it -so the .origin had very slim chances of surviving when narrowing by a union candidate

@@ -557,8 +557,8 @@ if (isEmpty(test)) {
> : ^^^^^^^^^^^^^^^^^^^^^^^^^

test; // EmptyString
>test : EmptyString
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Those changes are fine - it's the candidate that had .origin on it but the goal is to preserve type's .origin and not .candidate's. The contained types here are exactly the same

@jakebailey
Copy link
Member

@typescript-bot test it
@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 17, 2025

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

Command Status Results
pack this ✅ Started ✅ 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

typescript-bot commented Apr 17, 2025

Hey @jakebailey, I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
    "devDependencies": {
        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/165021/artifacts?artifactName=tgz&fileId=24DA55CD64888D5082CC34590B0920BBC7EC3B8C66ABBE37844DA0AFCB1CBA1502&fileName=/typescript-5.9.0-insiders.20250417.tgz"
    }
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/pr-build@5.9.0-pr-61589-2".;

@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 Here are the results of running the user tests with tsc comparing main and refs/pull/61589/merge:

There were infrastructure failures potentially unrelated to your change:

  • 1 instance of "Timeout"

Otherwise...

Something interesting changed - please have a look.

Details

webpack

tsconfig.types.json

  • [NEW] error TS7053: Element implicitly has an 'any' type because expression of type '"type"' can't be used to index type 'Node | Node[]'.

tsconfig.json

  • [NEW] error TS7053: Element implicitly has an 'any' type because expression of type '"type"' can't be used to index type 'Node | Node[]'.

@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 39 🔻+5 (+14.71%) ~ ~ p=0.001 n=6
Symbols 62,390 67,043 🔻+4,653 (+ 7.46%) ~ ~ p=0.001 n=6
Types 50,395 51,926 +1,531 (+ 3.04%) ~ ~ p=0.001 n=6
Memory used 193,619k (± 0.74%) 196,390k (± 0.72%) +2,771k (+ 1.43%) 195,628k 199,233k p=0.045 n=6
Parse Time 1.30s (± 0.64%) 1.30s (± 0.80%) ~ 1.29s 1.32s p=1.000 n=6
Bind Time 0.73s 0.73s ~ ~ ~ p=1.000 n=6
Check Time 9.75s (± 0.47%) 9.82s (± 0.28%) +0.08s (+ 0.79%) 9.78s 9.86s p=0.010 n=6
Emit Time 2.72s (± 1.11%) 2.70s (± 1.01%) ~ 2.66s 2.72s p=0.164 n=6
Total Time 14.50s (± 0.47%) 14.55s (± 0.37%) ~ 14.47s 14.59s p=0.170 n=6
angular-1 - node (v18.15.0, x64)
Errors 56 56 ~ ~ ~ p=1.000 n=6
Symbols 948,670 948,673 +3 (+ 0.00%) ~ ~ p=0.001 n=6
Types 410,947 410,979 +32 (+ 0.01%) ~ ~ p=0.001 n=6
Memory used 1,224,351k (± 0.01%) 1,224,211k (± 0.00%) -140k (- 0.01%) 1,224,172k 1,224,311k p=0.008 n=6
Parse Time 6.62s (± 0.77%) 6.66s (± 0.97%) ~ 6.54s 6.71s p=0.171 n=6
Bind Time 1.88s (± 0.62%) 1.89s (± 0.33%) ~ 1.88s 1.90s p=0.179 n=6
Check Time 31.93s (± 0.20%) 31.94s (± 0.38%) ~ 31.76s 32.11s p=0.629 n=6
Emit Time 15.24s (± 0.63%) 15.30s (± 0.78%) ~ 15.14s 15.48s p=0.520 n=6
Total Time 55.68s (± 0.25%) 55.79s (± 0.45%) ~ 55.42s 56.11s p=0.298 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,360,029 2,360,029 ~ ~ ~ p=1.000 n=6
Types 868,081 868,081 ~ ~ ~ p=1.000 n=6
Memory used 2,314,243k (± 0.00%) 2,314,254k (± 0.00%) ~ 2,314,166k 2,314,359k p=0.873 n=6
Parse Time 10.55s (± 0.39%) 10.56s (± 0.20%) ~ 10.54s 10.60s p=0.809 n=6
Bind Time 2.68s (± 0.28%) 2.70s (± 1.27%) ~ 2.64s 2.74s p=0.062 n=6
Check Time 84.41s (± 2.77%) 83.57s (± 0.43%) ~ 82.88s 83.84s p=1.000 n=6
Emit Time 0.37s (± 3.60%) 0.38s (± 1.46%) ~ 0.37s 0.38s p=0.228 n=6
Total Time 98.01s (± 2.39%) 97.22s (± 0.35%) ~ 96.59s 97.49s p=0.688 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,228,025 1,228,173 +148 (+ 0.01%) ~ ~ p=0.001 n=6
Types 267,258 267,341 +83 (+ 0.03%) ~ ~ p=0.001 n=6
Memory used 2,360,870k (± 0.03%) 2,360,816k (± 0.01%) ~ 2,360,685k 2,361,078k p=0.575 n=6
Parse Time 5.17s (± 0.74%) 5.20s (± 1.26%) ~ 5.12s 5.32s p=0.630 n=6
Bind Time 1.80s (± 0.50%) 1.80s (± 0.96%) ~ 1.77s 1.82s p=0.681 n=6
Check Time 35.37s (± 0.34%) 35.43s (± 0.89%) ~ 35.19s 36.05s p=0.810 n=6
Emit Time 2.98s (± 1.92%) 2.99s (± 1.42%) ~ 2.91s 3.03s p=0.871 n=6
Total Time 45.32s (± 0.33%) 45.42s (± 0.87%) ~ 45.07s 46.20s p=0.689 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,228,025 1,228,173 +148 (+ 0.01%) ~ ~ p=0.001 n=6
Types 267,258 267,341 +83 (+ 0.03%) ~ ~ p=0.001 n=6
Memory used 2,427,915k (± 0.02%) 2,427,797k (± 0.03%) ~ 2,426,789k 2,428,388k p=0.810 n=6
Parse Time 5.45s (± 0.88%) 5.45s (± 1.06%) ~ 5.40s 5.55s p=0.689 n=6
Bind Time 1.81s (± 1.28%) 1.81s (± 1.07%) ~ 1.78s 1.83s p=1.000 n=6
Check Time 35.43s (± 0.63%) 35.35s (± 0.27%) ~ 35.23s 35.46s p=0.936 n=6
Emit Time 3.07s (± 1.77%) 3.06s (± 1.04%) ~ 3.02s 3.11s p=0.872 n=6
Total Time 45.77s (± 0.60%) 45.69s (± 0.21%) ~ 45.59s 45.84s p=0.471 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 263,403 263,529 +126 (+ 0.05%) ~ ~ p=0.001 n=6
Types 107,094 107,158 +64 (+ 0.06%) ~ ~ p=0.001 n=6
Memory used 441,739k (± 0.01%) 442,029k (± 0.01%) +290k (+ 0.07%) 441,952k 442,122k p=0.005 n=6
Parse Time 3.55s (± 0.87%) 3.55s (± 0.29%) ~ 3.54s 3.57s p=0.871 n=6
Bind Time 1.32s (± 0.63%) 1.32s (± 1.48%) ~ 1.31s 1.36s p=0.445 n=6
Check Time 19.01s (± 0.33%) 19.07s (± 0.51%) ~ 18.95s 19.20s p=0.685 n=6
Emit Time 1.53s (± 1.28%) 1.53s (± 1.09%) ~ 1.51s 1.55s p=0.744 n=6
Total Time 25.42s (± 0.23%) 25.48s (± 0.38%) ~ 25.34s 25.61s p=0.296 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 71 73 +2 (+ 2.82%) ~ ~ p=0.001 n=6
Symbols 225,981 227,646 +1,665 (+ 0.74%) ~ ~ p=0.001 n=6
Types 94,356 95,227 +871 (+ 0.92%) ~ ~ p=0.001 n=6
Memory used 371,274k (± 0.02%) 372,867k (± 0.02%) +1,593k (+ 0.43%) 372,801k 372,970k p=0.005 n=6
Parse Time 2.89s (± 1.26%) 2.90s (± 0.89%) ~ 2.86s 2.94s p=0.623 n=6
Bind Time 1.59s (± 0.77%) 1.60s (± 1.61%) ~ 1.58s 1.64s p=0.868 n=6
Check Time 16.47s (± 0.56%) 16.59s (± 0.45%) +0.12s (+ 0.76%) 16.46s 16.67s p=0.045 n=6
Emit Time 0.00s (±244.70%) 0.00s ~ ~ ~ p=0.405 n=6
Total Time 20.95s (± 0.38%) 21.09s (± 0.53%) ~ 20.89s 21.20s p=0.065 n=6
vscode - node (v18.15.0, x64)
Errors 4 4 ~ ~ ~ p=1.000 n=6
Symbols 3,361,603 3,361,604 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 1,139,020 1,139,024 +4 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 3,419,409k (± 0.03%) 3,419,219k (± 0.00%) ~ 3,419,109k 3,419,328k p=0.575 n=6
Parse Time 14.60s (± 0.36%) 14.61s (± 0.36%) ~ 14.56s 14.70s p=0.871 n=6
Bind Time 4.85s (± 3.34%) 4.70s (± 0.33%) ~ 4.68s 4.72s p=0.124 n=6
Check Time 92.75s (± 3.06%) 92.14s (± 1.52%) ~ 91.16s 94.95s p=1.000 n=6
Emit Time 29.78s (± 1.65%) 29.52s (± 0.58%) ~ 29.36s 29.83s p=0.336 n=6
Total Time 141.97s (± 2.32%) 140.97s (± 0.93%) ~ 139.97s 143.58s p=0.521 n=6
webpack - node (v18.15.0, x64)
Errors 2 2 ~ ~ ~ p=1.000 n=6
Symbols 316,035 316,035 ~ ~ ~ p=1.000 n=6
Types 140,050 140,050 ~ ~ ~ p=1.000 n=6
Memory used 470,878k (± 0.03%) 470,780k (± 0.01%) ~ 470,721k 470,846k p=0.298 n=6
Parse Time 5.15s (± 0.47%) 5.16s (± 0.53%) ~ 5.12s 5.19s p=0.806 n=6
Bind Time 2.25s (± 1.55%) 2.25s (± 0.92%) ~ 2.22s 2.27s p=0.871 n=6
Check Time 25.83s (± 0.28%) 25.72s (± 0.30%) ~ 25.65s 25.84s p=0.077 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 33.24s (± 0.32%) 33.12s (± 0.30%) ~ 33.03s 33.29s p=0.075 n=6
xstate-main - node (v18.15.0, x64)
Errors 5 5 ~ ~ ~ p=1.000 n=6
Symbols 568,548 568,549 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 190,459 190,460 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 498,508k (± 0.02%) 498,504k (± 0.04%) ~ 498,120k 498,692k p=0.575 n=6
Parse Time 4.18s (± 0.65%) 4.19s (± 0.36%) ~ 4.18s 4.22s p=0.746 n=6
Bind Time 1.50s (± 0.69%) 1.51s (± 1.00%) ~ 1.48s 1.52s p=0.161 n=6
Check Time 25.08s (± 2.41%) 25.12s (± 2.73%) ~ 24.69s 26.51s p=0.810 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 30.76s (± 1.91%) 30.82s (± 2.23%) ~ 30.38s 32.21s p=0.688 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

@Andarist
Copy link
Contributor Author

Damn, those perf results are not great 😢 But first I'll have to investigate the webpack change

@Andarist Andarist marked this pull request as draft April 17, 2025 15:18
@typescript-bot
Copy link
Collaborator

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

Something interesting changed - please have a look.

Details

apollographql/apollo-client

1 of 13 projects failed to build with the old tsc and were ignored

tsconfig.json

src/tsconfig.json

resend/react-email

36 of 39 projects failed to build with the old tsc and were ignored

packages/render/tsconfig.json

TanStack/query

79 of 118 projects failed to build with the old tsc and were ignored

packages/eslint-plugin-query/tsconfig.prod.json

packages/eslint-plugin-query/tsconfig.json

@Andarist
Copy link
Contributor Author

@jakebailey could you rerun the tests here?

@jakebailey
Copy link
Member

@typescript-bot test it
@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 18, 2025

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

Command Status Results
pack this ✅ Started ✅ 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

typescript-bot commented Apr 18, 2025

Hey @jakebailey, I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
    "devDependencies": {
        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/165032/artifacts?artifactName=tgz&fileId=DC191BE44328575CEBE60ACECA83A2D2C1BFC93B0034E732034C342CEB4A671802&fileName=/typescript-5.9.0-insiders.20250418.tgz"
    }
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/pr-build@5.9.0-pr-61589-11".;

@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 Here are the results of running the user tests with tsc comparing main and refs/pull/61589/merge:

There were infrastructure failures potentially unrelated to your change:

  • 1 instance of "Timeout"

Otherwise...

Everything looks good!

@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 35 +1 (+ 2.94%) ~ ~ p=0.001 n=6
Symbols 62,390 62,396 +6 (+ 0.01%) ~ ~ p=0.001 n=6
Types 50,395 50,411 +16 (+ 0.03%) ~ ~ p=0.001 n=6
Memory used 193,546k (± 0.76%) 192,063k (± 0.99%) ~ 190,814k 194,617k p=0.230 n=6
Parse Time 1.31s (± 0.62%) 1.31s (± 0.39%) ~ 1.31s 1.32s p=0.114 n=6
Bind Time 0.73s 0.73s ~ ~ ~ p=1.000 n=6
Check Time 9.74s (± 0.27%) 9.62s (± 0.13%) -0.12s (- 1.21%) 9.61s 9.64s p=0.005 n=6
Emit Time 2.73s (± 0.68%) 2.72s (± 0.77%) ~ 2.69s 2.74s p=0.418 n=6
Total Time 14.51s (± 0.28%) 14.38s (± 0.08%) -0.13s (- 0.87%) 14.36s 14.39s p=0.005 n=6
angular-1 - node (v18.15.0, x64)
Errors 56 56 ~ ~ ~ p=1.000 n=6
Symbols 948,670 948,671 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 410,947 410,963 +16 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 1,224,382k (± 0.00%) 1,224,179k (± 0.01%) -203k (- 0.02%) 1,224,091k 1,224,353k p=0.008 n=6
Parse Time 6.59s (± 0.94%) 6.64s (± 0.65%) ~ 6.56s 6.68s p=0.195 n=6
Bind Time 1.89s (± 0.44%) 1.88s (± 0.43%) -0.02s (- 0.97%) 1.87s 1.89s p=0.013 n=6
Check Time 32.01s (± 0.58%) 31.83s (± 0.25%) ~ 31.70s 31.94s p=0.093 n=6
Emit Time 15.21s (± 0.66%) 15.18s (± 0.64%) ~ 15.06s 15.30s p=0.810 n=6
Total Time 55.70s (± 0.53%) 55.54s (± 0.31%) ~ 55.32s 55.81s p=0.378 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,360,780 2,360,780 ~ ~ ~ p=1.000 n=6
Types 868,446 868,446 ~ ~ ~ p=1.000 n=6
Memory used 2,316,189k (± 0.00%) 2,316,210k (± 0.00%) ~ 2,316,181k 2,316,247k p=0.230 n=6
Parse Time 10.55s (± 0.44%) 10.53s (± 0.29%) ~ 10.49s 10.57s p=0.335 n=6
Bind Time 2.66s (± 1.72%) 2.69s (± 1.07%) ~ 2.65s 2.73s p=0.518 n=6
Check Time 83.75s (± 1.59%) 83.88s (± 1.41%) ~ 82.63s 85.41s p=0.810 n=6
Emit Time 0.36s (± 3.77%) 0.36s (± 3.51%) ~ 0.35s 0.38s p=0.510 n=6
Total Time 97.33s (± 1.36%) 97.46s (± 1.21%) ~ 96.21s 98.99s p=0.936 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,228,025 1,228,173 +148 (+ 0.01%) ~ ~ p=0.001 n=6
Types 267,258 267,341 +83 (+ 0.03%) ~ ~ p=0.001 n=6
Memory used 2,360,702k (± 0.02%) 2,360,960k (± 0.02%) ~ 2,360,429k 2,361,618k p=0.689 n=6
Parse Time 5.21s (± 0.94%) 5.20s (± 1.01%) ~ 5.15s 5.27s p=0.521 n=6
Bind Time 1.80s (± 0.78%) 1.80s (± 0.42%) ~ 1.79s 1.81s p=0.867 n=6
Check Time 35.39s (± 0.30%) 35.38s (± 0.26%) ~ 35.24s 35.51s p=0.810 n=6
Emit Time 3.00s (± 0.93%) 3.01s (± 1.61%) ~ 2.97s 3.10s p=1.000 n=6
Total Time 45.40s (± 0.21%) 45.40s (± 0.18%) ~ 45.30s 45.52s p=0.936 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,228,025 1,228,173 +148 (+ 0.01%) ~ ~ p=0.001 n=6
Types 267,258 267,341 +83 (+ 0.03%) ~ ~ p=0.001 n=6
Memory used 2,793,946k (±14.29%) 3,038,523k (± 9.77%) 🔻+244,577k (+ 8.75%) 2,431,756k 3,160,235k p=0.020 n=6
Parse Time 6.89s (± 2.66%) 7.01s (± 1.02%) ~ 6.92s 7.12s p=0.471 n=6
Bind Time 2.17s (± 1.48%) 2.17s (± 1.60%) ~ 2.13s 2.23s p=0.808 n=6
Check Time 42.91s (± 0.47%) 42.92s (± 0.39%) ~ 42.73s 43.13s p=0.936 n=6
Emit Time 3.65s (± 4.43%) 3.55s (± 0.92%) ~ 3.50s 3.57s p=0.229 n=6
Total Time 55.62s (± 0.27%) 55.64s (± 0.37%) ~ 55.37s 55.83s p=0.936 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 263,403 263,529 +126 (+ 0.05%) ~ ~ p=0.001 n=6
Types 107,094 107,158 +64 (+ 0.06%) ~ ~ p=0.001 n=6
Memory used 441,742k (± 0.02%) 441,990k (± 0.01%) +248k (+ 0.06%) 441,937k 442,065k p=0.005 n=6
Parse Time 3.54s (± 1.04%) 3.55s (± 0.79%) ~ 3.50s 3.58s p=0.413 n=6
Bind Time 1.33s (± 0.82%) 1.32s (± 0.68%) ~ 1.31s 1.33s p=0.149 n=6
Check Time 18.99s (± 0.47%) 19.07s (± 0.43%) ~ 18.98s 19.18s p=0.336 n=6
Emit Time 1.53s (± 1.35%) 1.54s (± 0.54%) ~ 1.53s 1.55s p=0.868 n=6
Total Time 25.39s (± 0.33%) 25.47s (± 0.37%) ~ 25.35s 25.59s p=0.149 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 71 71 ~ ~ ~ p=1.000 n=6
Symbols 225,981 226,095 +114 (+ 0.05%) ~ ~ p=0.001 n=6
Types 94,356 94,456 +100 (+ 0.11%) ~ ~ p=0.001 n=6
Memory used 371,261k (± 0.01%) 371,610k (± 0.02%) +349k (+ 0.09%) 371,487k 371,737k p=0.005 n=6
Parse Time 2.90s (± 1.37%) 2.91s (± 0.80%) ~ 2.88s 2.95s p=0.808 n=6
Bind Time 1.60s (± 1.00%) 1.62s (± 2.34%) ~ 1.55s 1.65s p=0.169 n=6
Check Time 16.54s (± 0.34%) 16.58s (± 0.68%) ~ 16.46s 16.74s p=0.688 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 21.05s (± 0.17%) 21.12s (± 0.40%) ~ 21.02s 21.23s p=0.198 n=6
vscode - node (v18.15.0, x64)
Errors 4 4 ~ ~ ~ p=1.000 n=6
Symbols 3,362,714 3,362,715 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 1,139,426 1,139,430 +4 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 3,420,807k (± 0.00%) 3,420,725k (± 0.00%) ~ 3,420,622k 3,420,840k p=0.066 n=6
Parse Time 12.12s (± 0.26%) 12.08s (± 0.21%) ~ 12.05s 12.12s p=0.063 n=6
Bind Time 3.90s (± 0.38%) 3.93s (± 0.54%) ~ 3.90s 3.96s p=0.052 n=6
Check Time 77.71s (± 0.19%) 77.79s (± 0.46%) ~ 77.24s 78.33s p=0.575 n=6
Emit Time 25.02s (± 0.22%) 25.01s (± 0.35%) ~ 24.94s 25.18s p=0.521 n=6
Total Time 118.75s (± 0.11%) 118.82s (± 0.33%) ~ 118.14s 119.35s p=0.378 n=6
webpack - node (v18.15.0, x64)
Errors 2 2 ~ ~ ~ p=1.000 n=6
Symbols 316,041 316,041 ~ ~ ~ p=1.000 n=6
Types 140,052 140,052 ~ ~ ~ p=1.000 n=6
Memory used 470,767k (± 0.03%) 470,857k (± 0.02%) ~ 470,652k 470,979k p=0.298 n=6
Parse Time 5.17s (± 0.56%) 5.14s (± 0.91%) ~ 5.06s 5.18s p=0.257 n=6
Bind Time 2.27s (± 0.62%) 2.27s (± 0.92%) ~ 2.24s 2.29s p=0.935 n=6
Check Time 25.80s (± 0.18%) 25.80s (± 0.37%) ~ 25.71s 25.93s p=0.748 n=6
Emit Time 0.00s (±154.76%) 0.00s ~ ~ ~ p=0.174 n=6
Total Time 33.24s (± 0.17%) 33.21s (± 0.30%) ~ 33.09s 33.36s p=0.575 n=6
xstate-main - node (v18.15.0, x64)
Errors 5 5 ~ ~ ~ p=1.000 n=6
Symbols 568,548 568,549 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 190,459 190,460 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 498,527k (± 0.03%) 498,507k (± 0.02%) ~ 498,380k 498,576k p=0.575 n=6
Parse Time 4.17s (± 0.45%) 4.17s (± 0.28%) ~ 4.16s 4.19s p=0.621 n=6
Bind Time 1.51s (± 0.54%) 1.50s (± 0.70%) ~ 1.48s 1.51s p=0.078 n=6
Check Time 25.00s (± 2.14%) 25.07s (± 1.59%) ~ 24.76s 25.61s p=0.296 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 30.69s (± 1.73%) 30.74s (± 1.31%) ~ 30.42s 31.27s p=0.629 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/61589/merge:

Everything looks good!

@Andarist
Copy link
Contributor Author

@jakebailey could you rerun this again? I don't think this will fix the degraded performance (I'm working on that) but it would be nice to learn if the extended test suites can catch any new functional issues with the current version

@jakebailey
Copy link
Member

@typescript-bot test it
@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 20, 2025

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

Command Status Results
pack this ✅ Started ✅ 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

typescript-bot commented Apr 20, 2025

Hey @jakebailey, I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
    "devDependencies": {
        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/165038/artifacts?artifactName=tgz&fileId=C49E64C15E4422445E6375E948F8C98A365BC57BC995A2CB80EBBFEC51CD3BD302&fileName=/typescript-5.9.0-insiders.20250420.tgz"
    }
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/pr-build@5.9.0-pr-61589-19".;

@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 Here are the results of running the user tests with tsc comparing main and refs/pull/61589/merge:

There were infrastructure failures potentially unrelated to your change:

  • 1 instance of "Timeout"

Otherwise...

Everything looks good!

@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,390 62,393 +3 (+ 0.00%) ~ ~ p=0.001 n=6
Types 50,395 50,381 -14 (- 0.03%) ~ ~ p=0.001 n=6
Memory used 194,151k (± 0.95%) 194,091k (± 0.96%) ~ 192,853k 196,511k p=0.128 n=6
Parse Time 1.31s (± 1.15%) 1.31s (± 0.57%) ~ 1.30s 1.32s p=0.492 n=6
Bind Time 0.73s 0.73s ~ ~ ~ p=1.000 n=6
Check Time 9.75s (± 0.42%) 9.82s (± 0.29%) +0.07s (+ 0.70%) 9.78s 9.86s p=0.019 n=6
Emit Time 2.73s (± 0.36%) 2.74s (± 1.15%) ~ 2.72s 2.80s p=0.797 n=6
Total Time 14.51s (± 0.37%) 14.59s (± 0.32%) +0.08s (+ 0.57%) 14.53s 14.66s p=0.030 n=6
angular-1 - node (v18.15.0, x64)
Errors 56 56 ~ ~ ~ p=1.000 n=6
Symbols 948,670 948,672 +2 (+ 0.00%) ~ ~ p=0.001 n=6
Types 410,947 410,962 +15 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 1,224,357k (± 0.00%) 1,224,333k (± 0.00%) ~ 1,224,258k 1,224,422k p=0.470 n=6
Parse Time 6.62s (± 0.87%) 6.65s (± 0.60%) ~ 6.58s 6.70s p=0.569 n=6
Bind Time 1.88s (± 0.40%) 1.89s (± 0.52%) ~ 1.88s 1.90s p=0.109 n=6
Check Time 32.00s (± 0.36%) 31.97s (± 0.32%) ~ 31.86s 32.12s p=0.575 n=6
Emit Time 15.22s (± 0.64%) 15.15s (± 0.48%) ~ 15.05s 15.24s p=0.370 n=6
Total Time 55.72s (± 0.19%) 55.66s (± 0.20%) ~ 55.50s 55.83s p=0.378 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,360,830 2,360,830 ~ ~ ~ p=1.000 n=6
Types 868,468 868,468 ~ ~ ~ p=1.000 n=6
Memory used 2,315,960k (± 0.00%) 2,316,065k (± 0.01%) ~ 2,315,937k 2,316,558k p=1.000 n=6
Parse Time 8.73s (± 0.47%) 8.76s (± 0.35%) ~ 8.73s 8.81s p=0.197 n=6
Bind Time 2.19s (± 0.94%) 2.19s (± 0.50%) ~ 2.18s 2.21s p=0.933 n=6
Check Time 69.84s (± 0.36%) 69.87s (± 0.36%) ~ 69.53s 70.30s p=0.872 n=6
Emit Time 0.30s (± 2.75%) 0.30s (± 2.98%) ~ 0.29s 0.31s p=0.550 n=6
Total Time 81.07s (± 0.34%) 81.13s (± 0.32%) ~ 80.82s 81.58s p=0.748 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,228,025 1,228,022 -3 (- 0.00%) ~ ~ p=0.001 n=6
Types 267,258 267,246 -12 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 2,972,231k (±10.03%) 2,607,030k (±14.47%) ~ 2,361,757k 3,095,546k p=0.298 n=6
Parse Time 6.68s (± 1.72%) 6.59s (± 1.53%) ~ 6.47s 6.74s p=0.128 n=6
Bind Time 2.15s (± 1.02%) 2.18s (± 1.94%) ~ 2.12s 2.24s p=0.227 n=6
Check Time 42.96s (± 0.43%) 42.99s (± 0.99%) ~ 42.45s 43.38s p=0.688 n=6
Emit Time 3.45s (± 1.33%) 3.52s (± 2.79%) ~ 3.41s 3.64s p=0.471 n=6
Total Time 55.25s (± 0.55%) 55.28s (± 0.96%) ~ 54.61s 55.79s p=0.575 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,228,025 1,228,022 -3 (- 0.00%) ~ ~ p=0.001 n=6
Types 267,258 267,246 -12 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 2,427,654k (± 0.01%) 2,427,484k (± 0.03%) ~ 2,426,659k 2,428,243k p=0.575 n=6
Parse Time 5.46s (± 1.25%) 5.48s (± 1.43%) ~ 5.41s 5.59s p=0.688 n=6
Bind Time 1.81s (± 0.65%) 1.82s (± 0.54%) ~ 1.81s 1.83s p=0.082 n=6
Check Time 35.45s (± 0.77%) 35.35s (± 0.14%) ~ 35.28s 35.40s p=0.810 n=6
Emit Time 3.04s (± 1.30%) 3.06s (± 2.04%) ~ 2.99s 3.16s p=0.521 n=6
Total Time 45.76s (± 0.72%) 45.70s (± 0.21%) ~ 45.59s 45.80s p=0.936 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 263,403 263,399 -4 (- 0.00%) ~ ~ p=0.001 n=6
Types 107,094 107,077 -17 (- 0.02%) ~ ~ p=0.001 n=6
Memory used 441,746k (± 0.01%) 441,786k (± 0.01%) ~ 441,719k 441,860k p=0.298 n=6
Parse Time 3.56s (± 1.03%) 3.55s (± 1.43%) ~ 3.50s 3.63s p=0.376 n=6
Bind Time 1.33s (± 0.67%) 1.32s (± 0.68%) ~ 1.31s 1.33s p=0.113 n=6
Check Time 18.97s (± 0.37%) 19.05s (± 0.36%) ~ 18.97s 19.18s p=0.053 n=6
Emit Time 1.54s (± 1.58%) 1.54s (± 1.19%) ~ 1.52s 1.57s p=0.513 n=6
Total Time 25.40s (± 0.26%) 25.46s (± 0.44%) ~ 25.36s 25.67s p=0.469 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 71 71 ~ ~ ~ p=1.000 n=6
Symbols 225,981 225,980 -1 (- 0.00%) ~ ~ p=0.001 n=6
Types 94,356 94,356 ~ ~ ~ p=1.000 n=6
Memory used 371,269k (± 0.04%) 371,230k (± 0.01%) ~ 371,179k 371,305k p=0.630 n=6
Parse Time 2.90s (± 0.83%) 2.90s (± 1.17%) ~ 2.85s 2.94s p=1.000 n=6
Bind Time 1.61s (± 1.44%) 1.60s (± 1.60%) ~ 1.58s 1.64s p=0.461 n=6
Check Time 16.50s (± 0.30%) 16.55s (± 0.33%) ~ 16.47s 16.62s p=0.077 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 21.01s (± 0.32%) 21.05s (± 0.41%) ~ 20.93s 21.14s p=0.470 n=6
vscode - node (v18.15.0, x64)
Errors 4 4 ~ ~ ~ p=1.000 n=6
Symbols 3,364,573 3,364,574 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 1,140,065 1,140,069 +4 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 3,422,246k (± 0.01%) 3,422,398k (± 0.01%) ~ 3,421,949k 3,422,626k p=0.471 n=6
Parse Time 14.61s (± 0.43%) 14.81s (± 3.18%) ~ 14.53s 15.76s p=0.689 n=6
Bind Time 4.67s (± 0.55%) 4.71s (± 1.06%) ~ 4.65s 4.79s p=0.107 n=6
Check Time 93.00s (± 3.44%) 94.02s (± 3.12%) ~ 90.49s 97.92s p=0.810 n=6
Emit Time 28.74s (± 6.69%) 28.47s (± 9.87%) ~ 24.92s 31.03s p=0.378 n=6
Total Time 141.02s (± 1.44%) 142.01s (± 2.55%) ~ 139.27s 148.17s p=0.936 n=6
webpack - node (v18.15.0, x64)
Errors 2 2 ~ ~ ~ p=1.000 n=6
Symbols 316,041 316,041 ~ ~ ~ p=1.000 n=6
Types 140,052 140,052 ~ ~ ~ p=1.000 n=6
Memory used 470,893k (± 0.02%) 470,799k (± 0.03%) ~ 470,667k 471,008k p=0.173 n=6
Parse Time 5.16s (± 0.72%) 5.18s (± 0.66%) ~ 5.12s 5.22s p=0.332 n=6
Bind Time 2.26s (± 0.78%) 2.24s (± 0.94%) ~ 2.21s 2.27s p=0.054 n=6
Check Time 25.79s (± 0.47%) 25.82s (± 0.41%) ~ 25.70s 25.97s p=0.747 n=6
Emit Time 0.00s 0.00s (±244.70%) ~ 0.00s 0.01s p=0.405 n=6
Total Time 33.21s (± 0.40%) 33.24s (± 0.29%) ~ 33.13s 33.40s p=0.574 n=6
xstate-main - node (v18.15.0, x64)
Errors 5 5 ~ ~ ~ p=1.000 n=6
Symbols 570,517 570,518 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 191,417 191,418 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 500,777k (± 0.03%) 500,877k (± 0.03%) ~ 500,604k 501,055k p=0.173 n=6
Parse Time 4.31s (± 0.58%) 4.31s (± 0.73%) ~ 4.28s 4.37s p=0.936 n=6
Bind Time 1.53s (± 1.12%) 1.53s (± 0.87%) ~ 1.51s 1.54s p=0.867 n=6
Check Time 25.15s (± 2.07%) 25.00s (± 1.36%) ~ 24.78s 25.68s p=1.000 n=6
Emit Time 0.00s 0.00s (±244.70%) ~ 0.00s 0.01s p=0.405 n=6
Total Time 30.99s (± 1.72%) 30.84s (± 1.09%) ~ 30.58s 31.51s p=0.936 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/61589/merge:

Everything looks good!

@Andarist
Copy link
Contributor Author

The last results were better but there is still some slight increase in check type of Compiler-Unions. I have pushed out now a version that might address this. Could you rerun tests for me again here @jakebailey 🙏 ? :)

@jakebailey
Copy link
Member

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 21, 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

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

There were infrastructure failures potentially unrelated to your change:

  • 1 instance of "Timeout"

Otherwise...

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,390 62,395 +5 (+ 0.01%) ~ ~ p=0.001 n=6
Types 50,395 50,410 +15 (+ 0.03%) ~ ~ p=0.001 n=6
Memory used 195,967k (± 0.82%) 194,815k (± 0.78%) -1,152k (- 0.59%) 191,719k 195,540k p=0.045 n=6
Parse Time 1.60s (± 1.60%) 1.59s (± 1.24%) ~ 1.57s 1.63s p=0.511 n=6
Bind Time 0.87s (± 1.87%) 0.89s (± 1.56%) ~ 0.87s 0.90s p=0.254 n=6
Check Time 11.74s (± 0.38%) 11.79s (± 0.20%) +0.05s (+ 0.43%) 11.76s 11.82s p=0.045 n=6
Emit Time 3.41s (± 4.67%) 3.37s (± 3.98%) ~ 3.26s 3.57s p=0.686 n=6
Total Time 17.63s (± 0.97%) 17.64s (± 0.79%) ~ 17.52s 17.82s p=1.000 n=6
angular-1 - node (v18.15.0, x64)
Errors 56 56 ~ ~ ~ p=1.000 n=6
Symbols 948,670 948,681 +11 (+ 0.00%) ~ ~ p=0.001 n=6
Types 410,947 410,967 +20 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 1,224,373k (± 0.00%) 1,230,127k (± 0.00%) +5,754k (+ 0.47%) 1,230,067k 1,230,165k p=0.005 n=6
Parse Time 6.63s (± 0.71%) 6.67s (± 0.27%) ~ 6.64s 6.69s p=0.104 n=6
Bind Time 1.89s (± 0.88%) 1.88s (± 1.10%) ~ 1.87s 1.92s p=0.676 n=6
Check Time 32.01s (± 0.45%) 32.41s (± 0.47%) +0.40s (+ 1.25%) 32.25s 32.61s p=0.005 n=6
Emit Time 15.21s (± 0.95%) 15.27s (± 0.40%) ~ 15.19s 15.35s p=0.630 n=6
Total Time 55.73s (± 0.42%) 56.24s (± 0.30%) +0.51s (+ 0.91%) 56.04s 56.44s p=0.005 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,360,852 2,360,852 ~ ~ ~ p=1.000 n=6
Types 868,468 868,468 ~ ~ ~ p=1.000 n=6
Memory used 2,315,968k (± 0.00%) 2,315,993k (± 0.00%) ~ 2,315,943k 2,316,055k p=0.630 n=6
Parse Time 8.72s (± 0.33%) 8.74s (± 0.29%) ~ 8.71s 8.77s p=0.333 n=6
Bind Time 2.19s (± 0.61%) 2.19s (± 0.47%) ~ 2.18s 2.21s p=1.000 n=6
Check Time 69.88s (± 0.38%) 70.16s (± 0.28%) ~ 69.87s 70.45s p=0.066 n=6
Emit Time 0.30s (± 2.75%) 0.30s ~ ~ ~ p=0.290 n=6
Total Time 81.08s (± 0.31%) 81.40s (± 0.23%) +0.31s (+ 0.38%) 81.11s 81.65s p=0.045 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,228,025 1,228,052 +27 (+ 0.00%) ~ ~ p=0.001 n=6
Types 267,258 267,249 -9 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 2,360,355k (± 0.01%) 2,360,694k (± 0.02%) ~ 2,359,860k 2,361,479k p=0.230 n=6
Parse Time 5.22s (± 0.85%) 5.20s (± 0.80%) ~ 5.16s 5.28s p=0.469 n=6
Bind Time 1.80s (± 0.84%) 1.80s (± 0.57%) ~ 1.78s 1.81s p=0.867 n=6
Check Time 35.34s (± 0.24%) 35.44s (± 0.07%) +0.10s (+ 0.28%) 35.40s 35.47s p=0.013 n=6
Emit Time 3.01s (± 0.78%) 3.00s (± 1.98%) ~ 2.92s 3.08s p=1.000 n=6
Total Time 45.36s (± 0.25%) 45.45s (± 0.11%) ~ 45.36s 45.50s p=0.128 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,228,025 1,228,052 +27 (+ 0.00%) ~ ~ p=0.001 n=6
Types 267,258 267,249 -9 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 2,428,151k (± 0.01%) 2,427,930k (± 0.02%) ~ 2,427,101k 2,428,549k p=0.575 n=6
Parse Time 5.43s (± 0.61%) 5.48s (± 0.82%) ~ 5.40s 5.53s p=0.066 n=6
Bind Time 1.81s (± 0.54%) 1.81s (± 0.89%) ~ 1.78s 1.83s p=1.000 n=6
Check Time 35.47s (± 0.60%) 35.55s (± 0.97%) ~ 35.19s 36.01s p=0.873 n=6
Emit Time 3.06s (± 0.96%) 3.06s (± 0.56%) ~ 3.04s 3.08s p=1.000 n=6
Total Time 45.78s (± 0.52%) 45.89s (± 0.79%) ~ 45.47s 46.38s p=0.521 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 263,403 263,426 +23 (+ 0.01%) ~ ~ p=0.001 n=6
Types 107,094 107,082 -12 (- 0.01%) ~ ~ p=0.001 n=6
Memory used 441,728k (± 0.01%) 442,353k (± 0.25%) +624k (+ 0.14%) 441,805k 444,649k p=0.008 n=6
Parse Time 3.55s (± 1.09%) 3.54s (± 0.90%) ~ 3.49s 3.57s p=0.420 n=6
Bind Time 1.31s (± 1.12%) 1.32s (± 0.64%) ~ 1.31s 1.33s p=0.867 n=6
Check Time 18.93s (± 0.45%) 19.02s (± 0.58%) ~ 18.93s 19.22s p=0.229 n=6
Emit Time 1.54s (± 1.16%) 1.53s (± 1.52%) ~ 1.49s 1.55s p=1.000 n=6
Total Time 25.33s (± 0.45%) 25.40s (± 0.48%) ~ 25.29s 25.63s p=0.336 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 71 71 ~ ~ ~ p=1.000 n=6
Symbols 225,981 225,980 -1 (- 0.00%) ~ ~ p=0.001 n=6
Types 94,356 94,356 ~ ~ ~ p=1.000 n=6
Memory used 371,326k (± 0.04%) 371,506k (± 0.07%) ~ 371,278k 371,894k p=0.128 n=6
Parse Time 2.88s (± 1.24%) 2.92s (± 0.42%) +0.04s (+ 1.22%) 2.90s 2.93s p=0.042 n=6
Bind Time 1.59s (± 0.62%) 1.60s (± 1.02%) ~ 1.58s 1.62s p=0.737 n=6
Check Time 16.50s (± 0.24%) 16.55s (± 0.37%) ~ 16.44s 16.60s p=0.092 n=6
Emit Time 0.00s (±244.70%) 0.00s ~ ~ ~ p=0.405 n=6
Total Time 20.97s (± 0.25%) 21.07s (± 0.26%) +0.09s (+ 0.45%) 20.99s 21.12s p=0.037 n=6
vscode - node (v18.15.0, x64)
Errors 4 4 ~ ~ ~ p=1.000 n=6
Symbols 3,364,906 3,364,908 +2 (+ 0.00%) ~ ~ p=0.001 n=6
Types 1,140,149 1,140,154 +5 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 3,422,997k (± 0.01%) 3,422,791k (± 0.00%) ~ 3,422,702k 3,422,858k p=0.078 n=6
Parse Time 18.19s (± 0.45%) 18.25s (± 2.75%) ~ 17.96s 19.27s p=0.149 n=6
Bind Time 5.78s (± 0.53%) 5.77s (± 0.39%) ~ 5.75s 5.81s p=0.936 n=6
Check Time 115.08s (± 4.87%) 113.40s (± 2.51%) ~ 111.09s 118.35s p=0.936 n=6
Emit Time 33.29s (± 9.40%) 35.30s (± 5.28%) ~ 31.51s 36.37s p=0.471 n=6
Total Time 172.33s (± 2.13%) 172.73s (± 1.10%) ~ 170.82s 175.21s p=0.261 n=6
webpack - node (v18.15.0, x64)
Errors 2 2 ~ ~ ~ p=1.000 n=6
Symbols 316,147 316,147 ~ ~ ~ p=1.000 n=6
Types 140,126 140,126 ~ ~ ~ p=1.000 n=6
Memory used 470,850k (± 0.04%) 470,953k (± 0.02%) ~ 470,798k 471,051k p=0.230 n=6
Parse Time 4.17s (± 1.04%) 4.15s (± 1.25%) ~ 4.06s 4.20s p=0.808 n=6
Bind Time 1.82s (± 1.46%) 1.82s (± 0.83%) ~ 1.80s 1.84s p=0.743 n=6
Check Time 20.80s (± 0.45%) 20.80s (± 0.36%) ~ 20.68s 20.89s p=1.000 n=6
Emit Time 0.00s (±154.76%) 0.00s (±154.76%) ~ 0.00s 0.01s p=1.000 n=6
Total Time 26.80s (± 0.41%) 26.77s (± 0.26%) ~ 26.69s 26.88s p=0.748 n=6
xstate-main - node (v18.15.0, x64)
Errors 5 5 ~ ~ ~ p=1.000 n=6
Symbols 570,517 570,518 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 191,417 191,418 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 500,820k (± 0.04%) 500,953k (± 0.01%) ~ 500,850k 501,000k p=0.092 n=6
Parse Time 4.31s (± 0.45%) 4.32s (± 0.35%) ~ 4.30s 4.34s p=0.623 n=6
Bind Time 1.52s (± 0.99%) 1.54s (± 0.96%) +0.02s (+ 1.43%) 1.52s 1.56s p=0.040 n=6
Check Time 25.11s (± 2.48%) 24.90s (± 0.32%) ~ 24.82s 25.03s p=1.000 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 30.94s (± 2.02%) 30.76s (± 0.28%) ~ 30.64s 30.89s p=0.688 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/61589/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.

Aliases are lost when conditionals are applied
3 participants