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

Potentially speed up / lower memory use of getTypeListId #53367

Closed
wants to merge 1 commit into from

Conversation

jakebailey
Copy link
Member

This seems like one source of high memory allocation on #51188. Let's try something new here.

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

@typescript-bot perf test this faster

@jakebailey
Copy link
Member Author

@typescript-bot perf test this faster pretty please?

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 20, 2023

Heya @jakebailey, I've started to run the abridged perf test suite on this PR at 47fc847. 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..53367

Metric main 53367 Delta Best Worst p-value
Angular - node (v16.17.1, x64)
Memory used 361,045k (± 0.01%) 360,934k (± 0.01%) -111k (- 0.03%) 360,899k 360,960k p=0.005 n=6
Parse Time 3.53s (± 0.49%) 3.55s (± 0.69%) ~ 3.51s 3.58s p=0.219 n=6
Bind Time 1.18s (± 0.64%) 1.18s (± 0.46%) ~ 1.18s 1.19s p=0.476 n=6
Check Time 9.45s (± 0.29%) 9.52s (± 0.62%) ~ 9.45s 9.60s p=0.065 n=6
Emit Time 7.93s (± 0.54%) 7.93s (± 1.07%) ~ 7.85s 8.03s p=1.000 n=6
Total Time 22.10s (± 0.22%) 22.18s (± 0.39%) ~ 22.03s 22.29s p=0.128 n=6
Compiler-Unions - node (v16.17.1, x64)
Memory used 193,088k (± 0.73%) 190,282k (± 0.72%) -2,806k (- 1.45%) 189,694k 193,098k p=0.045 n=6
Parse Time 1.58s (± 1.60%) 1.58s (± 0.93%) ~ 1.56s 1.60s p=0.803 n=6
Bind Time 0.82s (± 0.50%) 0.82s (± 0.77%) ~ 0.81s 0.83s p=0.673 n=6
Check Time 10.08s (± 0.57%) 10.05s (± 0.55%) ~ 10.00s 10.16s p=0.421 n=6
Emit Time 2.98s (± 0.86%) 3.00s (± 0.81%) ~ 2.96s 3.03s p=0.075 n=6
Total Time 15.46s (± 0.45%) 15.46s (± 0.25%) ~ 15.42s 15.53s p=0.936 n=6
Monaco - node (v16.17.1, x64)
Memory used 345,573k (± 0.01%) 345,326k (± 0.00%) -247k (- 0.07%) 345,306k 345,356k p=0.005 n=6
Parse Time 2.73s (± 0.38%) 2.73s (± 0.31%) ~ 2.71s 2.73s p=1.000 n=6
Bind Time 1.08s (± 0.50%) 1.09s (± 0.90%) ~ 1.07s 1.10s p=0.322 n=6
Check Time 7.70s (± 0.40%) 7.71s (± 0.30%) ~ 7.70s 7.76s p=0.288 n=6
Emit Time 4.48s (± 0.73%) 4.48s (± 0.79%) ~ 4.43s 4.53s p=1.000 n=6
Total Time 15.99s (± 0.40%) 16.00s (± 0.35%) ~ 15.94s 16.09s p=1.000 n=6
TFS - node (v16.17.1, x64)
Memory used 299,811k (± 0.01%) 299,765k (± 0.01%) -46k (- 0.02%) 299,729k 299,816k p=0.030 n=6
Parse Time 2.18s (± 0.82%) 2.18s (± 0.37%) ~ 2.17s 2.19s p=1.000 n=6
Bind Time 1.24s (± 0.66%) 1.24s (± 1.10%) ~ 1.22s 1.26s p=0.933 n=6
Check Time 7.16s (± 0.29%) 7.19s (± 0.42%) ~ 7.16s 7.23s p=0.089 n=6
Emit Time 4.34s (± 0.55%) 4.35s (± 0.61%) ~ 4.31s 4.39s p=0.676 n=6
Total Time 14.92s (± 0.32%) 14.96s (± 0.26%) ~ 14.91s 15.02s p=0.285 n=6
material-ui - node (v16.17.1, x64)
Memory used 476,373k (± 0.00%) 474,472k (± 0.00%) -1,901k (- 0.40%) 474,445k 474,500k p=0.005 n=6
Parse Time 3.22s (± 0.20%) 3.23s (± 0.41%) ~ 3.21s 3.25s p=0.203 n=6
Bind Time 0.96s (± 0.43%) 0.96s (± 0.57%) ~ 0.95s 0.96s p=0.282 n=6
Check Time 17.93s (± 0.35%) 18.06s (± 0.69%) +0.13s (+ 0.75%) 17.88s 18.22s p=0.045 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 22.10s (± 0.31%) 22.25s (± 0.59%) +0.15s (+ 0.66%) 22.06s 22.43s p=0.045 n=6
xstate - node (v16.17.1, x64)
Memory used 550,626k (± 0.01%) 550,538k (± 0.02%) ~ 550,432k 550,653k p=0.128 n=6
Parse Time 3.94s (± 0.30%) 3.95s (± 0.47%) ~ 3.93s 3.98s p=0.106 n=6
Bind Time 1.80s (± 0.29%) 1.80s (± 0.65%) ~ 1.78s 1.81s p=0.666 n=6
Check Time 3.04s (± 0.92%) 3.06s (± 0.98%) ~ 3.04s 3.12s p=0.335 n=6
Emit Time 0.09s (± 0.00%) 0.09s (± 0.00%) ~ 0.09s 0.09s p=1.000 n=6
Total Time 8.86s (± 0.41%) 8.91s (± 0.40%) ~ 8.86s 8.96s p=0.077 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 53367 6
Baseline main 6

Developer Information:

Download Benchmark

@jakebailey
Copy link
Member Author

It does lower memory usage, but, apparently not overall time enough to matter. Was hoping for less GCing.

@jakebailey jakebailey closed this Mar 20, 2023
@jakebailey jakebailey deleted the faster-getTypeListId branch March 15, 2024 22:59
This pull request was closed.
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