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

[experiment] Use Sets instead of lists in more places #57992

Closed
wants to merge 6 commits into from

Conversation

jakebailey
Copy link
Member

An old experiment inspired by #55224

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

@typescript-bot perf test this faster

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 28, 2024

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

Command Status Results
perf test this faster ✅ Started 👀 Results

Comment on lines +26002 to +26003
matchedSources ? filter(sources, t => !matchedSources!.has(t)) : sources,
matchedTargets ? filter(targets, t => !matchedTargets!.has(t)) : targets,
Copy link
Member

Choose a reason for hiding this comment

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

This is so weird - why didn't these always just return matchedSources ?? sources and matchedTargets ?? targets before?

Copy link
Member

Choose a reason for hiding this comment

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

Oh, these are the ones that don't match.

@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
Angular - node (v18.15.0, x64)
Memory used 295,598k (± 0.01%) 295,666k (± 0.01%) +68k (+ 0.02%) 295,597k 295,693k p=0.037 n=6
Parse Time 3.20s (± 0.46%) 3.20s (± 0.67%) ~ 3.18s 3.24s p=0.807 n=6
Bind Time 1.00s (± 0.52%) 1.00s (± 1.23%) ~ 0.98s 1.01s p=0.672 n=6
Check Time 9.70s (± 0.38%) 9.72s (± 0.51%) ~ 9.65s 9.79s p=0.520 n=6
Emit Time 8.39s (± 0.42%) 8.40s (± 0.20%) ~ 8.38s 8.42s p=0.685 n=6
Total Time 22.29s (± 0.14%) 22.32s (± 0.21%) ~ 22.27s 22.39s p=0.228 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used 192,720k (± 0.78%) 192,659k (± 0.74%) ~ 192,018k 195,571k p=0.471 n=6
Parse Time 2.03s (± 1.10%) 2.01s (± 1.20%) ~ 1.99s 2.04s p=0.326 n=6
Bind Time 1.08s (± 1.39%) 1.08s (± 0.70%) ~ 1.07s 1.09s p=1.000 n=6
Check Time 13.99s (± 0.35%) 13.89s (± 0.50%) -0.10s (- 0.73%) 13.79s 13.96s p=0.024 n=6
Emit Time 3.88s (± 0.76%) 3.88s (± 0.65%) ~ 3.83s 3.90s p=0.934 n=6
Total Time 20.98s (± 0.35%) 20.86s (± 0.32%) -0.12s (- 0.57%) 20.77s 20.92s p=0.030 n=6
Monaco - node (v18.15.0, x64)
Memory used 347,405k (± 0.00%) 347,431k (± 0.00%) +26k (+ 0.01%) 347,414k 347,453k p=0.037 n=6
Parse Time 2.48s (± 0.59%) 2.49s (± 0.36%) ~ 2.48s 2.50s p=0.363 n=6
Bind Time 0.93s (± 0.44%) 0.93s (± 0.44%) ~ 0.92s 0.93s p=1.000 n=6
Check Time 7.03s (± 0.34%) 7.04s (± 0.35%) ~ 7.00s 7.07s p=0.252 n=6
Emit Time 4.07s (± 0.37%) 4.07s (± 0.43%) ~ 4.05s 4.10s p=0.565 n=6
Total Time 14.50s (± 0.24%) 14.53s (± 0.17%) ~ 14.49s 14.56s p=0.145 n=6
TFS - node (v18.15.0, x64)
Memory used 302,793k (± 0.01%) 302,776k (± 0.00%) ~ 302,755k 302,788k p=0.229 n=6
Parse Time 2.39s (± 1.14%) 2.42s (± 1.09%) ~ 2.37s 2.44s p=0.168 n=6
Bind Time 1.19s (± 0.53%) 1.21s (± 0.86%) +0.02s (+ 1.40%) 1.19s 1.22s p=0.019 n=6
Check Time 7.51s (± 0.39%) 7.53s (± 0.26%) ~ 7.51s 7.56s p=0.244 n=6
Emit Time 4.27s (± 0.75%) 4.25s (± 0.27%) ~ 4.24s 4.27s p=0.145 n=6
Total Time 15.36s (± 0.25%) 15.41s (± 0.25%) ~ 15.33s 15.43s p=0.167 n=6
material-ui - node (v18.15.0, x64)
Memory used 510,078k (± 0.01%) 510,155k (± 0.01%) +77k (+ 0.02%) 510,102k 510,194k p=0.013 n=6
Parse Time 3.19s (± 0.31%) 3.19s (± 0.24%) ~ 3.18s 3.20s p=0.652 n=6
Bind Time 1.19s (± 1.95%) 1.19s (± 1.63%) ~ 1.17s 1.22s p=0.871 n=6
Check Time 20.63s (± 0.49%) 20.74s (± 0.20%) +0.11s (+ 0.55%) 20.70s 20.81s p=0.030 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 25.00s (± 0.37%) 25.11s (± 0.18%) +0.11s (+ 0.45%) 25.08s 25.18s p=0.023 n=6
mui-docs - node (v18.15.0, x64)
Memory used 1,744,648k (± 0.00%) 1,744,656k (± 0.00%) ~ 1,744,634k 1,744,693k p=0.468 n=6
Parse Time 9.64s (± 0.29%) 9.64s (± 0.83%) ~ 9.53s 9.76s p=0.936 n=6
Bind Time 3.49s (± 0.73%) 3.48s (± 0.86%) ~ 3.43s 3.51s p=0.745 n=6
Check Time 82.30s (± 0.50%) 84.45s (± 0.37%) +2.15s (+ 2.61%) 84.16s 85.00s p=0.005 n=6
Emit Time 0.19s (± 2.81%) 0.19s (± 4.29%) ~ 0.19s 0.21s p=0.855 n=6
Total Time 95.63s (± 0.41%) 97.77s (± 0.38%) +2.14s (+ 2.24%) 97.45s 98.44s p=0.005 n=6
self-build-src - node (v18.15.0, x64)
Memory used 2,396,285k (± 0.01%) 2,397,019k (± 0.01%) +734k (+ 0.03%) 2,396,611k 2,397,235k p=0.008 n=6
Parse Time 4.99s (± 0.68%) 4.98s (± 0.84%) ~ 4.91s 5.04s p=0.748 n=6
Bind Time 1.92s (± 1.03%) 1.90s (± 0.72%) ~ 1.89s 1.92s p=0.281 n=6
Check Time 33.88s (± 0.39%) 34.10s (± 0.36%) +0.23s (+ 0.67%) 33.99s 34.30s p=0.020 n=6
Emit Time 2.69s (± 1.18%) 2.70s (± 1.25%) ~ 2.66s 2.76s p=0.572 n=6
Total Time 43.48s (± 0.31%) 43.69s (± 0.31%) +0.21s (+ 0.48%) 43.57s 43.93s p=0.020 n=6
self-compiler - node (v18.15.0, x64)
Memory used 416,093k (± 0.00%) 416,505k (± 0.01%) +412k (+ 0.10%) 416,459k 416,538k p=0.005 n=6
Parse Time 2.75s (± 0.70%) 2.73s (± 0.79%) ~ 2.70s 2.76s p=0.170 n=6
Bind Time 1.08s (± 0.70%) 1.08s (± 0.70%) ~ 1.07s 1.09s p=0.487 n=6
Check Time 15.41s (± 0.28%) 15.53s (± 0.46%) +0.12s (+ 0.80%) 15.46s 15.63s p=0.013 n=6
Emit Time 1.14s (± 1.21%) 1.13s (± 0.87%) ~ 1.11s 1.14s p=0.591 n=6
Total Time 20.38s (± 0.19%) 20.48s (± 0.33%) +0.10s (+ 0.50%) 20.41s 20.59s p=0.013 n=6
vscode - node (v18.15.0, x64)
Memory used 2,898,563k (± 0.00%) 2,898,560k (± 0.00%) ~ 2,898,517k 2,898,586k p=0.575 n=6
Parse Time 13.33s (± 8.17%) 12.89s (± 0.33%) ~ 12.84s 12.93s p=0.742 n=6
Bind Time 4.11s (± 0.72%) 4.11s (± 0.71%) ~ 4.07s 4.15s p=1.000 n=6
Check Time 71.58s (± 0.57%) 72.16s (± 0.43%) +0.58s (+ 0.81%) 71.75s 72.49s p=0.031 n=6
Emit Time 19.34s (± 0.39%) 19.45s (± 0.71%) ~ 19.27s 19.63s p=0.199 n=6
Total Time 108.37s (± 1.27%) 108.60s (± 0.29%) ~ 108.05s 108.90s p=0.093 n=6
webpack - node (v18.15.0, x64)
Memory used 408,885k (± 0.01%) 409,109k (± 0.01%) +223k (+ 0.05%) 409,063k 409,158k p=0.005 n=6
Parse Time 3.88s (± 0.48%) 3.89s (± 0.69%) ~ 3.85s 3.93s p=0.808 n=6
Bind Time 1.69s (± 1.04%) 1.68s (± 0.81%) ~ 1.66s 1.70s p=0.805 n=6
Check Time 16.84s (± 0.40%) 16.84s (± 0.42%) ~ 16.78s 16.97s p=0.936 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 22.41s (± 0.28%) 22.42s (± 0.38%) ~ 22.34s 22.58s p=0.872 n=6
xstate - node (v18.15.0, x64)
Memory used 513,439k (± 0.01%) 513,532k (± 0.02%) ~ 513,407k 513,692k p=0.230 n=6
Parse Time 3.95s (± 0.65%) 3.95s (± 0.52%) ~ 3.92s 3.98s p=0.871 n=6
Bind Time 1.88s (± 0.89%) 1.88s (± 1.14%) ~ 1.86s 1.91s p=0.804 n=6
Check Time 3.44s (± 0.50%) 3.44s (± 0.67%) ~ 3.41s 3.47s p=0.871 n=6
Emit Time 0.09s (± 9.41%) 0.09s (± 8.51%) ~ 0.08s 0.10s p=0.611 n=6
Total Time 9.36s (± 0.53%) 9.37s (± 0.40%) ~ 9.33s 9.43s p=0.628 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Angular - node (v18.15.0, x64)
  • Compiler-Unions - node (v18.15.0, x64)
  • Monaco - node (v18.15.0, x64)
  • TFS - node (v18.15.0, x64)
  • material-ui - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@jakebailey
Copy link
Member Author

Dissapointing

@jakebailey jakebailey closed this Mar 29, 2024
@jakebailey jakebailey deleted the more-sets branch March 29, 2024 03:22
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.

3 participants