Skip to content

[experiment] Hack build to produce top level let bindings #52928

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 1 commit into from

Conversation

jakebailey
Copy link
Member

Conspiracy theory: the perf boost from modules/esbuild didn't come from scope hoisting, it came from all of our top-level variables turning into var.

@jakebailey
Copy link
Member Author

@typescript-bot perf test faster

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Feb 23, 2023
@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 23, 2023

Heya @jakebailey, I've started to run the abridged perf test suite on this PR at 122359e. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

@jakebailey
The results of the perf run you requested are in!

Here they are:

Comparison Report - main..52928

Metric main 52928 Delta Best Worst p-value
Angular - node (v16.17.1, x64)
Memory used 358,861k (± 0.00%) 359,078k (± 0.01%) +217k (+ 0.06%) 359,043k 359,128k p=0.005 n=6
Parse Time 3.71s (± 0.44%) 3.72s (± 0.26%) ~ 3.71s 3.73s p=0.461 n=6
Bind Time 1.19s (± 0.53%) 1.18s (± 0.46%) ~ 1.18s 1.19s p=0.201 n=6
Check Time 9.41s (± 0.79%) 9.50s (± 0.49%) ~ 9.44s 9.57s p=0.064 n=6
Emit Time 7.90s (± 0.52%) 8.02s (± 0.39%) +0.13s (+ 1.58%) 7.98s 8.06s p=0.005 n=6
Total Time 22.21s (± 0.52%) 22.43s (± 0.38%) +0.22s (+ 0.97%) 22.31s 22.55s p=0.013 n=6
Compiler-Unions - node (v16.17.1, x64)
Memory used 191,354k (± 0.04%) 191,536k (± 0.02%) +182k (+ 0.10%) 191,498k 191,592k p=0.005 n=6
Parse Time 1.56s (± 1.43%) 1.56s (± 0.96%) ~ 1.54s 1.58s p=0.566 n=6
Bind Time 0.82s (± 0.92%) 0.82s (± 0.50%) ~ 0.82s 0.83s p=1.000 n=6
Check Time 10.07s (± 0.57%) 10.13s (± 0.43%) ~ 10.08s 10.20s p=0.092 n=6
Emit Time 3.01s (± 1.22%) 3.02s (± 0.40%) ~ 3.00s 3.03s p=0.571 n=6
Total Time 15.46s (± 0.69%) 15.53s (± 0.33%) ~ 15.49s 15.62s p=0.173 n=6
Monaco - node (v16.17.1, x64)
Memory used 343,082k (± 0.01%) 343,208k (± 0.00%) +126k (+ 0.04%) 343,186k 343,233k p=0.005 n=6
Parse Time 2.81s (± 0.76%) 2.82s (± 0.70%) ~ 2.78s 2.83s p=0.463 n=6
Bind Time 1.08s (± 0.48%) 1.09s (± 0.47%) ~ 1.08s 1.09s p=0.311 n=6
Check Time 7.66s (± 0.36%) 7.72s (± 0.15%) +0.06s (+ 0.76%) 7.71s 7.74s p=0.005 n=6
Emit Time 4.44s (± 0.53%) 4.44s (± 0.20%) ~ 4.43s 4.45s p=0.365 n=6
Total Time 15.99s (± 0.22%) 16.06s (± 0.14%) +0.07s (+ 0.47%) 16.04s 16.10s p=0.007 n=6
TFS - node (v16.17.1, x64)
Memory used 299,201k (± 0.01%) 299,412k (± 0.00%) +211k (+ 0.07%) 299,400k 299,434k p=0.005 n=6
Parse Time 2.19s (± 0.75%) 2.19s (± 0.69%) ~ 2.16s 2.20s p=1.000 n=6
Bind Time 1.23s (± 0.98%) 1.24s (± 1.10%) ~ 1.22s 1.25s p=0.676 n=6
Check Time 7.19s (± 0.45%) 7.21s (± 0.57%) ~ 7.16s 7.26s p=0.292 n=6
Emit Time 4.34s (± 0.74%) 4.35s (± 1.23%) ~ 4.30s 4.44s p=0.936 n=6
Total Time 14.94s (± 0.38%) 14.98s (± 0.67%) ~ 14.86s 15.10s p=0.630 n=6
material-ui - node (v16.17.1, x64)
Memory used 475,770k (± 0.01%) 475,866k (± 0.01%) +96k (+ 0.02%) 475,788k 475,963k p=0.020 n=6
Parse Time 3.33s (± 0.29%) 3.31s (± 0.17%) -0.02s (- 0.50%) 3.31s 3.32s p=0.015 n=6
Bind Time 0.96s (± 0.00%) 0.97s (± 0.86%) +0.02s (+ 1.56%) 0.96s 0.98s p=0.008 n=6
Check Time 18.10s (± 1.01%) 18.11s (± 0.25%) ~ 18.05s 18.17s p=0.199 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 22.39s (± 0.81%) 22.41s (± 0.21%) ~ 22.34s 22.45s p=0.198 n=6
xstate - node (v16.17.1, x64)
Memory used 545,822k (± 0.03%) 546,083k (± 0.02%) +261k (+ 0.05%) 545,951k 546,282k p=0.020 n=6
Parse Time 4.25s (± 0.46%) 4.29s (± 0.37%) +0.03s (+ 0.78%) 4.27s 4.31s p=0.029 n=6
Bind Time 1.74s (± 0.51%) 1.77s (± 0.43%) +0.03s (+ 1.63%) 1.76s 1.78s p=0.004 n=6
Check Time 2.98s (± 0.25%) 3.02s (± 0.49%) +0.04s (+ 1.23%) 3.00s 3.04s p=0.005 n=6
Emit Time 0.09s (± 0.00%) 0.09s (± 0.00%) ~ 0.09s 0.09s p=1.000 n=6
Total Time 9.07s (± 0.29%) 9.17s (± 0.33%) +0.10s (+ 1.10%) 9.14s 9.22s p=0.005 n=6
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-135-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v16.17.1, x64)
Scenarios
  • Angular - node (v16.17.1, x64)
  • Compiler-Unions - node (v16.17.1, x64)
  • Monaco - node (v16.17.1, x64)
  • TFS - node (v16.17.1, x64)
  • material-ui - node (v16.17.1, x64)
  • xstate - node (v16.17.1, x64)
Benchmark Name Iterations
Current 52928 6
Baseline main 6

Developer Information:

Download Benchmark

@jakebailey
Copy link
Member Author

Conspiracy theory mostly disproven. This regresses performance a little, but not enough to completely negate the modules PR. This implies that most of the performance was gained by scope hosting providing direct access / local bindings, kind of like #52920 but applied to the entire codebase.

@jakebailey jakebailey closed this Feb 23, 2023
@jakebailey jakebailey deleted the uh-oh-var branch February 23, 2023 17:16
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