Skip to content

[experiment] Bail out early in union production if too many literals/templates #59705

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

Closed
wants to merge 2 commits into from

Conversation

jakebailey
Copy link
Member

Motivated by #59655 and similar ☹️

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Aug 21, 2024
@jakebailey
Copy link
Member Author

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

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

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/59705/merge:

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 30 30 ~ ~ ~ p=1.000 n=6
Symbols 62,153 62,153 ~ ~ ~ p=1.000 n=6
Types 50,242 50,242 ~ ~ ~ p=1.000 n=6
Memory used 193,573k (± 0.89%) 193,136k (± 0.71%) ~ 192,330k 195,896k p=1.000 n=6
Parse Time 1.57s (± 0.67%) 1.57s (± 0.84%) ~ 1.55s 1.58s p=0.864 n=6
Bind Time 0.86s (± 0.88%) 0.86s (± 1.27%) ~ 0.85s 0.87s p=0.865 n=6
Check Time 11.41s (± 0.36%) 11.36s (± 0.26%) -0.05s (- 0.45%) 11.33s 11.41s p=0.045 n=6
Emit Time 3.24s (± 0.86%) 3.24s (± 0.58%) ~ 3.22s 3.27s p=0.871 n=6
Total Time 17.09s (± 0.25%) 17.04s (± 0.17%) -0.05s (- 0.28%) 16.99s 17.07s p=0.045 n=6
angular-1 - node (v18.15.0, x64)
Errors 7 7 ~ ~ ~ p=1.000 n=6
Symbols 945,753 945,753 ~ ~ ~ p=1.000 n=6
Types 410,067 410,067 ~ ~ ~ p=1.000 n=6
Memory used 1,222,666k (± 0.00%) 1,222,682k (± 0.00%) ~ 1,222,650k 1,222,712k p=0.378 n=6
Parse Time 7.93s (± 0.65%) 7.93s (± 0.47%) ~ 7.88s 7.98s p=1.000 n=6
Bind Time 2.22s (± 0.23%) 2.22s (± 0.37%) ~ 2.21s 2.23s p=0.929 n=6
Check Time 36.46s (± 0.30%) 36.38s (± 0.27%) ~ 36.23s 36.49s p=0.297 n=6
Emit Time 17.78s (± 0.58%) 17.76s (± 0.45%) ~ 17.61s 17.84s p=1.000 n=6
Total Time 64.39s (± 0.26%) 64.30s (± 0.16%) ~ 64.19s 64.44s p=0.378 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,508,161 2,508,161 ~ ~ ~ p=1.000 n=6
Types 992,225 992,225 ~ ~ ~ p=1.000 n=6
Memory used 2,375,708k (± 0.00%) 2,375,665k (± 0.00%) ~ 2,375,561k 2,375,770k p=0.298 n=6
Parse Time 13.59s (± 0.60%) 13.59s (± 0.27%) ~ 13.52s 13.62s p=0.872 n=6
Bind Time 3.24s (± 0.78%) 3.23s (± 0.25%) ~ 3.22s 3.24s p=0.566 n=6
Check Time 108.25s (± 1.25%) 107.27s (± 0.38%) ~ 106.58s 107.77s p=0.093 n=6
Emit Time 0.40s (± 2.74%) 0.39s (± 3.82%) ~ 0.38s 0.41s p=0.554 n=6
Total Time 125.48s (± 1.08%) 124.48s (± 0.35%) ~ 123.81s 125.02s p=0.078 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,231,998 1,232,008 +10 (+ 0.00%) ~ ~ p=0.001 n=6
Types 264,593 264,598 +5 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,472,455k (± 7.43%) 2,650,619k (± 5.49%) ~ 2,353,121k 2,710,733k p=0.298 n=6
Parse Time 6.01s (± 0.74%) 6.03s (± 0.55%) ~ 5.98s 6.06s p=0.520 n=6
Bind Time 2.24s (± 0.61%) 2.24s (± 1.01%) ~ 2.20s 2.26s p=0.685 n=6
Check Time 40.82s (± 1.09%) 40.47s (± 1.20%) ~ 40.13s 41.43s p=0.128 n=6
Emit Time 4.00s (± 0.89%) 4.06s (± 2.68%) ~ 3.95s 4.26s p=0.230 n=6
Total Time 53.09s (± 0.88%) 52.82s (± 0.96%) ~ 52.32s 53.78s p=0.297 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,231,998 1,232,008 +10 (+ 0.00%) ~ ~ p=0.001 n=6
Types 264,593 264,598 +5 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,427,654k (± 0.01%) 2,428,510k (± 0.01%) +857k (+ 0.04%) 2,428,153k 2,429,054k p=0.005 n=6
Parse Time 6.23s (± 1.42%) 6.22s (± 0.40%) ~ 6.19s 6.25s p=1.000 n=6
Bind Time 2.04s (± 0.57%) 2.04s (± 0.74%) ~ 2.02s 2.05s p=1.000 n=6
Check Time 41.84s (± 0.59%) 41.64s (± 0.74%) ~ 41.33s 41.96s p=0.199 n=6
Emit Time 4.05s (± 0.74%) 4.05s (± 2.02%) ~ 3.97s 4.20s p=0.377 n=6
Total Time 54.17s (± 0.38%) 53.96s (± 0.54%) ~ 53.60s 54.32s p=0.173 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 256,992 257,002 +10 (+ 0.00%) ~ ~ p=0.001 n=6
Types 105,667 105,672 +5 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 429,697k (± 0.03%) 429,717k (± 0.03%) ~ 429,539k 429,864k p=0.936 n=6
Parse Time 4.17s (± 0.52%) 4.16s (± 0.35%) ~ 4.14s 4.18s p=0.226 n=6
Bind Time 1.59s (± 1.10%) 1.59s (± 1.03%) ~ 1.58s 1.61s p=1.000 n=6
Check Time 22.43s (± 0.38%) 22.41s (± 0.47%) ~ 22.26s 22.51s p=0.688 n=6
Emit Time 2.06s (± 0.84%) 2.03s (± 0.67%) -0.03s (- 1.21%) 2.02s 2.05s p=0.028 n=6
Total Time 30.25s (± 0.28%) 30.19s (± 0.31%) ~ 30.09s 30.32s p=0.198 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 68 68 ~ ~ ~ p=1.000 n=6
Symbols 225,018 225,018 ~ ~ ~ p=1.000 n=6
Types 94,249 94,249 ~ ~ ~ p=1.000 n=6
Memory used 370,226k (± 0.02%) 370,266k (± 0.03%) ~ 370,130k 370,487k p=0.689 n=6
Parse Time 2.76s (± 0.58%) 2.76s (± 0.65%) ~ 2.73s 2.78s p=0.867 n=6
Bind Time 1.56s (± 0.48%) 1.57s (± 1.06%) ~ 1.55s 1.59s p=0.240 n=6
Check Time 15.75s (± 0.24%) 15.71s (± 0.37%) ~ 15.63s 15.78s p=0.197 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 20.06s (± 0.25%) 20.04s (± 0.21%) ~ 20.00s 20.11s p=0.521 n=6
vscode - node (v18.15.0, x64)
Errors 66 66 ~ ~ ~ p=1.000 n=6
Symbols 3,017,608 3,017,608 ~ ~ ~ p=1.000 n=6
Types 1,038,333 1,038,333 ~ ~ ~ p=1.000 n=6
Memory used 3,137,101k (± 0.00%) 3,137,078k (± 0.00%) ~ 3,136,959k 3,137,189k p=0.471 n=6
Parse Time 14.07s (± 0.57%) 14.01s (± 0.36%) ~ 13.93s 14.08s p=0.109 n=6
Bind Time 4.30s (± 0.35%) 4.30s (± 0.24%) ~ 4.29s 4.32s p=0.615 n=6
Check Time 80.17s (± 0.19%) 80.39s (± 0.36%) ~ 80.03s 80.68s p=0.229 n=6
Emit Time 20.51s (± 0.55%) 20.48s (± 0.32%) ~ 20.38s 20.56s p=0.689 n=6
Total Time 119.04s (± 0.19%) 119.17s (± 0.26%) ~ 118.73s 119.46s p=0.336 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 275,310 275,310 ~ ~ ~ p=1.000 n=6
Types 112,431 112,431 ~ ~ ~ p=1.000 n=6
Memory used 424,153k (± 0.01%) 424,201k (± 0.01%) ~ 424,123k 424,249k p=0.128 n=6
Parse Time 3.31s (± 0.53%) 3.32s (± 0.40%) ~ 3.30s 3.34s p=0.492 n=6
Bind Time 1.45s (± 0.56%) 1.45s (± 0.75%) ~ 1.44s 1.47s p=0.666 n=6
Check Time 14.83s (± 0.25%) 14.88s (± 0.37%) ~ 14.79s 14.95s p=0.127 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 19.59s (± 0.24%) 19.65s (± 0.27%) ~ 19.56s 19.71s p=0.128 n=6
xstate-main - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 534,554 534,554 ~ ~ ~ p=1.000 n=6
Types 176,379 176,379 ~ ~ ~ p=1.000 n=6
Memory used 479,418k (± 0.01%) 479,428k (± 0.01%) ~ 479,376k 479,499k p=1.000 n=6
Parse Time 3.43s (± 0.62%) 3.42s (± 0.86%) ~ 3.39s 3.47s p=0.513 n=6
Bind Time 1.25s (± 1.06%) 1.25s (± 0.67%) ~ 1.24s 1.26s p=0.849 n=6
Check Time 18.13s (± 0.19%) 18.11s (± 0.40%) ~ 18.00s 18.18s p=1.000 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 22.81s (± 0.14%) 22.79s (± 0.38%) ~ 22.66s 22.88s 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/59705/merge:

Everything looks good!

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
None yet
Development

Successfully merging this pull request may close these issues.

2 participants