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

Use objects instead of closures for type mappers #36576

Merged
merged 11 commits into from
Mar 11, 2020
Merged

Conversation

ahejlsberg
Copy link
Member

@ahejlsberg ahejlsberg commented Feb 2, 2020

This PR switches our representation of type mappers from functions (that close over state) to objects. This brings greater transparency to the actual mappings performed by type mappers and enables more efficient construction of composite mappers.

The PR improves performance by up to 1% (with a 9% outlier on older versions of Node.js) and memory usage by up to 8%.

@ahejlsberg
Copy link
Member Author

@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 2, 2020

Heya @ahejlsberg, I've started to run the perf test suite on this PR at 63338f9. You can monitor the build here. It should now contribute to this PR's status checks.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - master..36576

Metric master 36576 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 356,434k (± 0.02%) 358,022k (± 0.01%) +1,588k (+ 0.45%) 357,922k 358,113k
Parse Time 1.62s (± 0.72%) 1.61s (± 0.51%) -0.01s (- 0.31%) 1.60s 1.64s
Bind Time 0.89s (± 0.45%) 0.88s (± 0.88%) -0.01s (- 1.12%) 0.86s 0.89s
Check Time 4.66s (± 0.59%) 4.65s (± 0.44%) -0.01s (- 0.21%) 4.61s 4.71s
Emit Time 5.21s (± 0.89%) 5.18s (± 0.59%) -0.02s (- 0.44%) 5.10s 5.24s
Total Time 12.38s (± 0.60%) 12.33s (± 0.36%) -0.05s (- 0.40%) 12.22s 12.42s
Monaco - node (v10.16.3, x64)
Memory used 364,597k (± 0.02%) 364,043k (± 0.01%) -553k (- 0.15%) 363,983k 364,125k
Parse Time 1.25s (± 0.54%) 1.25s (± 0.30%) -0.00s (- 0.16%) 1.24s 1.25s
Bind Time 0.77s (± 0.61%) 0.77s (± 0.80%) -0.00s (- 0.13%) 0.76s 0.78s
Check Time 4.68s (± 0.34%) 4.66s (± 0.63%) -0.01s (- 0.28%) 4.61s 4.76s
Emit Time 2.88s (± 0.48%) 2.89s (± 0.78%) +0.00s (+ 0.14%) 2.81s 2.93s
Total Time 9.58s (± 0.32%) 9.57s (± 0.51%) -0.01s (- 0.13%) 9.46s 9.73s
TFS - node (v10.16.3, x64)
Memory used 324,237k (± 0.08%) 323,266k (± 0.02%) -971k (- 0.30%) 323,147k 323,366k
Parse Time 0.95s (± 0.47%) 0.95s (± 0.50%) -0.00s (- 0.11%) 0.94s 0.96s
Bind Time 0.75s (± 1.18%) 0.74s (± 1.36%) -0.00s (- 0.27%) 0.72s 0.77s
Check Time 4.22s (± 0.70%) 4.21s (± 0.39%) -0.01s (- 0.14%) 4.18s 4.26s
Emit Time 3.02s (± 0.97%) 3.01s (± 0.91%) -0.01s (- 0.23%) 2.95s 3.07s
Total Time 8.93s (± 0.54%) 8.92s (± 0.40%) -0.01s (- 0.12%) 8.83s 8.98s
Angular - node (v12.1.0, x64)
Memory used 332,341k (± 0.02%) 333,799k (± 0.02%) +1,458k (+ 0.44%) 333,658k 334,017k
Parse Time 1.56s (± 0.77%) 1.57s (± 0.90%) +0.01s (+ 0.38%) 1.54s 1.61s
Bind Time 0.86s (± 0.57%) 0.87s (± 0.84%) +0.00s (+ 0.46%) 0.85s 0.89s
Check Time 4.58s (± 0.49%) 4.59s (± 0.71%) +0.00s (+ 0.00%) 4.53s 4.64s
Emit Time 5.42s (± 0.95%) 5.37s (± 1.09%) -0.05s (- 0.92%) 5.27s 5.58s
Total Time 12.44s (± 0.49%) 12.40s (± 0.69%) -0.04s (- 0.35%) 12.26s 12.68s
Monaco - node (v12.1.0, x64)
Memory used 344,559k (± 0.02%) 343,994k (± 0.02%) -565k (- 0.16%) 343,820k 344,171k
Parse Time 1.22s (± 0.56%) 1.22s (± 0.31%) -0.00s (- 0.08%) 1.21s 1.22s
Bind Time 0.75s (± 0.74%) 0.74s (± 0.80%) -0.00s (- 0.40%) 0.73s 0.76s
Check Time 4.53s (± 0.43%) 4.54s (± 0.59%) +0.01s (+ 0.15%) 4.47s 4.59s
Emit Time 2.95s (± 0.63%) 2.97s (± 0.83%) +0.01s (+ 0.37%) 2.92s 3.02s
Total Time 9.45s (± 0.37%) 9.47s (± 0.38%) +0.02s (+ 0.17%) 9.41s 9.54s
TFS - node (v12.1.0, x64)
Memory used 306,396k (± 0.02%) 305,528k (± 0.02%) -869k (- 0.28%) 305,399k 305,673k
Parse Time 0.94s (± 0.85%) 0.94s (± 0.61%) -0.00s (- 0.21%) 0.93s 0.95s
Bind Time 0.70s (± 0.79%) 0.70s (± 0.52%) +0.00s (+ 0.28%) 0.70s 0.71s
Check Time 4.18s (± 0.58%) 4.20s (± 0.65%) +0.02s (+ 0.41%) 4.13s 4.25s
Emit Time 3.08s (± 0.71%) 3.07s (± 0.53%) -0.01s (- 0.32%) 3.04s 3.10s
Total Time 8.91s (± 0.48%) 8.91s (± 0.42%) +0.01s (+ 0.07%) 8.83s 9.00s
Angular - node (v8.9.0, x64)
Memory used 351,498k (± 0.02%) 352,846k (± 0.02%) +1,348k (+ 0.38%) 352,700k 353,033k
Parse Time 2.09s (± 0.24%) 2.11s (± 0.63%) +0.02s (+ 0.95%) 2.08s 2.14s
Bind Time 0.92s (± 0.90%) 0.93s (± 1.06%) +0.02s (+ 1.75%) 0.90s 0.95s
Check Time 5.43s (± 0.59%) 5.42s (± 0.52%) -0.01s (- 0.13%) 5.37s 5.47s
Emit Time 6.23s (± 0.68%) 6.18s (± 0.53%) -0.05s (- 0.77%) 6.09s 6.25s
Total Time 14.67s (± 0.46%) 14.65s (± 0.32%) -0.01s (- 0.10%) 14.57s 14.75s
Monaco - node (v8.9.0, x64)
Memory used 362,833k (± 0.01%) 362,256k (± 0.01%) -577k (- 0.16%) 362,182k 362,365k
Parse Time 1.56s (± 0.62%) 1.56s (± 0.65%) +0.01s (+ 0.38%) 1.54s 1.59s
Bind Time 0.95s (± 0.65%) 0.95s (± 0.93%) -0.00s (- 0.21%) 0.93s 0.97s
Check Time 5.44s (± 1.41%) 5.37s (± 1.50%) -0.07s (- 1.29%) 5.24s 5.60s
Emit Time 3.26s (± 4.29%) 3.33s (± 3.29%) +0.07s (+ 2.15%) 2.99s 3.46s
Total Time 11.21s (± 0.75%) 11.21s (± 0.77%) +0.00s (+ 0.02%) 11.08s 11.45s
TFS - node (v8.9.0, x64)
Memory used 323,393k (± 0.01%) 322,491k (± 0.01%) -902k (- 0.28%) 322,399k 322,587k
Parse Time 1.26s (± 0.46%) 1.26s (± 0.44%) -0.00s (- 0.40%) 1.25s 1.27s
Bind Time 0.76s (± 0.68%) 0.76s (± 0.77%) -0.00s (- 0.26%) 0.75s 0.77s
Check Time 4.83s (± 0.43%) 4.80s (± 0.71%) -0.04s (- 0.79%) 4.72s 4.87s
Emit Time 3.19s (± 1.29%) 3.21s (± 0.62%) +0.02s (+ 0.63%) 3.17s 3.25s
Total Time 10.04s (± 0.58%) 10.02s (± 0.39%) -0.02s (- 0.21%) 9.95s 10.09s
Angular - node (v8.9.0, x86)
Memory used 199,825k (± 0.02%) 200,598k (± 0.02%) +773k (+ 0.39%) 200,526k 200,670k
Parse Time 2.04s (± 0.91%) 2.04s (± 0.92%) +0.00s (+ 0.15%) 2.01s 2.10s
Bind Time 1.05s (± 0.79%) 1.05s (± 0.56%) +0.01s (+ 0.76%) 1.04s 1.07s
Check Time 5.00s (± 0.39%) 4.93s (± 0.39%) -0.06s (- 1.30%) 4.90s 4.99s
Emit Time 6.14s (± 1.66%) 5.99s (± 1.65%) -0.15s (- 2.38%) 5.90s 6.33s
Total Time 14.22s (± 0.78%) 14.02s (± 0.70%) -0.20s (- 1.40%) 13.91s 14.29s
Monaco - node (v8.9.0, x86)
Memory used 203,721k (± 0.02%) 203,424k (± 0.02%) -297k (- 0.15%) 203,340k 203,503k
Parse Time 1.60s (± 0.68%) 1.60s (± 0.48%) -0.00s (- 0.06%) 1.58s 1.61s
Bind Time 0.77s (± 0.44%) 0.78s (± 1.37%) +0.01s (+ 1.04%) 0.76s 0.81s
Check Time 5.15s (± 1.68%) 5.16s (± 1.21%) +0.01s (+ 0.25%) 5.08s 5.34s
Emit Time 3.13s (± 2.71%) 3.16s (± 1.56%) +0.03s (+ 1.02%) 3.03s 3.23s
Total Time 10.65s (± 0.28%) 10.70s (± 0.28%) +0.05s (+ 0.47%) 10.62s 10.78s
TFS - node (v8.9.0, x86)
Memory used 182,569k (± 0.02%) 182,124k (± 0.01%) -445k (- 0.24%) 182,074k 182,165k
Parse Time 1.31s (± 1.19%) 1.29s (± 0.76%) -0.02s (- 1.22%) 1.28s 1.32s
Bind Time 0.71s (± 0.63%) 0.71s (± 1.87%) +0.00s (+ 0.28%) 0.70s 0.76s
Check Time 4.57s (± 0.44%) 4.57s (± 0.73%) -0.00s (- 0.09%) 4.52s 4.68s
Emit Time 2.94s (± 1.03%) 2.94s (± 0.56%) 0.00s ( 0.00%) 2.91s 2.97s
Total Time 9.54s (± 0.43%) 9.52s (± 0.52%) -0.02s (- 0.17%) 9.45s 9.66s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-166-generic
Architecturex64
Available Memory16 GB
Available Memory4 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v8.9.0, x64)
  • node (v8.9.0, x86)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v8.9.0, x64)
  • Angular - node (v8.9.0, x86)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v8.9.0, x64)
  • Monaco - node (v8.9.0, x86)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v8.9.0, x64)
  • TFS - node (v8.9.0, x86)
Benchmark Name Iterations
Current 36576 10
Baseline master 10

@ahejlsberg
Copy link
Member Author

@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 2, 2020

Heya @ahejlsberg, I've started to run the perf test suite on this PR at 979bc6a. You can monitor the build here. It should now contribute to this PR's status checks.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - master..36576

Metric master 36576 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 356,434k (± 0.02%) 357,890k (± 0.04%) +1,456k (+ 0.41%) 357,408k 358,092k
Parse Time 1.62s (± 0.72%) 1.61s (± 0.50%) -0.01s (- 0.43%) 1.60s 1.63s
Bind Time 0.89s (± 0.45%) 0.88s (± 1.02%) -0.02s (- 1.80%) 0.85s 0.90s
Check Time 4.66s (± 0.59%) 4.67s (± 0.74%) +0.00s (+ 0.09%) 4.60s 4.74s
Emit Time 5.21s (± 0.89%) 5.18s (± 0.59%) -0.03s (- 0.54%) 5.12s 5.25s
Total Time 12.38s (± 0.60%) 12.33s (± 0.48%) -0.05s (- 0.40%) 12.22s 12.46s
Monaco - node (v10.16.3, x64)
Memory used 364,597k (± 0.02%) 364,121k (± 0.01%) -475k (- 0.13%) 364,049k 364,155k
Parse Time 1.25s (± 0.54%) 1.24s (± 0.40%) -0.00s (- 0.24%) 1.23s 1.25s
Bind Time 0.77s (± 0.61%) 0.77s (± 0.44%) +0.00s (+ 0.39%) 0.77s 0.78s
Check Time 4.68s (± 0.34%) 4.67s (± 0.37%) -0.01s (- 0.17%) 4.63s 4.71s
Emit Time 2.88s (± 0.48%) 2.88s (± 0.48%) -0.00s (- 0.03%) 2.87s 2.93s
Total Time 9.58s (± 0.32%) 9.57s (± 0.22%) -0.01s (- 0.09%) 9.52s 9.61s
TFS - node (v10.16.3, x64)
Memory used 324,237k (± 0.08%) 323,331k (± 0.01%) -906k (- 0.28%) 323,219k 323,417k
Parse Time 0.95s (± 0.47%) 0.94s (± 0.63%) -0.00s (- 0.42%) 0.93s 0.96s
Bind Time 0.75s (± 1.18%) 0.75s (± 1.27%) -0.00s (- 0.13%) 0.72s 0.76s
Check Time 4.22s (± 0.70%) 4.22s (± 0.50%) +0.00s (+ 0.07%) 4.19s 4.28s
Emit Time 3.02s (± 0.97%) 3.01s (± 1.06%) -0.01s (- 0.43%) 2.94s 3.08s
Total Time 8.93s (± 0.54%) 8.92s (± 0.50%) -0.01s (- 0.12%) 8.84s 9.06s
Angular - node (v12.1.0, x64)
Memory used 332,341k (± 0.02%) 333,674k (± 0.08%) +1,333k (+ 0.40%) 332,645k 334,011k
Parse Time 1.56s (± 0.77%) 1.57s (± 0.80%) +0.00s (+ 0.13%) 1.54s 1.59s
Bind Time 0.86s (± 0.57%) 0.87s (± 0.64%) +0.00s (+ 0.46%) 0.86s 0.88s
Check Time 4.58s (± 0.49%) 4.59s (± 0.79%) +0.01s (+ 0.11%) 4.52s 4.70s
Emit Time 5.42s (± 0.95%) 5.43s (± 1.44%) +0.00s (+ 0.06%) 5.34s 5.66s
Total Time 12.44s (± 0.49%) 12.45s (± 0.88%) +0.01s (+ 0.08%) 12.27s 12.75s
Monaco - node (v12.1.0, x64)
Memory used 344,559k (± 0.02%) 344,019k (± 0.02%) -540k (- 0.16%) 343,905k 344,141k
Parse Time 1.22s (± 0.56%) 1.21s (± 0.58%) -0.01s (- 0.41%) 1.20s 1.23s
Bind Time 0.75s (± 0.74%) 0.76s (± 1.53%) +0.01s (+ 1.07%) 0.74s 0.78s
Check Time 4.53s (± 0.43%) 4.55s (± 0.61%) +0.01s (+ 0.24%) 4.48s 4.61s
Emit Time 2.95s (± 0.63%) 2.94s (± 0.79%) -0.01s (- 0.37%) 2.91s 3.01s
Total Time 9.45s (± 0.37%) 9.45s (± 0.44%) +0.00s (+ 0.02%) 9.39s 9.54s
TFS - node (v12.1.0, x64)
Memory used 306,396k (± 0.02%) 305,557k (± 0.01%) -840k (- 0.27%) 305,445k 305,653k
Parse Time 0.94s (± 0.85%) 0.94s (± 0.43%) -0.00s (- 0.32%) 0.93s 0.95s
Bind Time 0.70s (± 0.79%) 0.71s (± 1.16%) +0.01s (+ 0.71%) 0.69s 0.73s
Check Time 4.18s (± 0.58%) 4.19s (± 0.35%) +0.01s (+ 0.14%) 4.16s 4.23s
Emit Time 3.08s (± 0.71%) 3.09s (± 0.80%) +0.01s (+ 0.36%) 3.04s 3.15s
Total Time 8.91s (± 0.48%) 8.93s (± 0.43%) +0.02s (+ 0.20%) 8.86s 9.04s
Angular - node (v8.9.0, x64)
Memory used 351,498k (± 0.02%) 352,895k (± 0.02%) +1,397k (+ 0.40%) 352,751k 353,093k
Parse Time 2.09s (± 0.24%) 2.11s (± 0.27%) +0.02s (+ 0.72%) 2.10s 2.12s
Bind Time 0.92s (± 0.90%) 0.93s (± 0.73%) +0.02s (+ 1.97%) 0.92s 0.95s
Check Time 5.43s (± 0.59%) 5.46s (± 0.60%) +0.03s (+ 0.50%) 5.35s 5.53s
Emit Time 6.23s (± 0.68%) 6.19s (± 0.67%) -0.04s (- 0.66%) 6.08s 6.28s
Total Time 14.67s (± 0.46%) 14.69s (± 0.50%) +0.02s (+ 0.14%) 14.44s 14.84s
Monaco - node (v8.9.0, x64)
Memory used 362,833k (± 0.01%) 362,287k (± 0.01%) -546k (- 0.15%) 362,166k 362,381k
Parse Time 1.56s (± 0.62%) 1.56s (± 0.44%) -0.00s (- 0.19%) 1.55s 1.58s
Bind Time 0.95s (± 0.65%) 0.95s (± 0.50%) -0.00s (- 0.21%) 0.94s 0.96s
Check Time 5.44s (± 1.41%) 5.36s (± 1.23%) -0.08s (- 1.47%) 5.29s 5.57s
Emit Time 3.26s (± 4.29%) 3.33s (± 3.00%) +0.07s (+ 2.06%) 3.05s 3.46s
Total Time 11.21s (± 0.75%) 11.19s (± 0.44%) -0.02s (- 0.18%) 11.03s 11.27s
TFS - node (v8.9.0, x64)
Memory used 323,393k (± 0.01%) 322,492k (± 0.01%) -901k (- 0.28%) 322,423k 322,606k
Parse Time 1.26s (± 0.46%) 1.26s (± 0.44%) -0.01s (- 0.40%) 1.25s 1.27s
Bind Time 0.76s (± 0.68%) 0.76s (± 0.65%) -0.00s (- 0.40%) 0.75s 0.77s
Check Time 4.83s (± 0.43%) 4.81s (± 0.60%) -0.03s (- 0.52%) 4.74s 4.86s
Emit Time 3.19s (± 1.29%) 3.20s (± 0.51%) +0.01s (+ 0.19%) 3.17s 3.24s
Total Time 10.04s (± 0.58%) 10.02s (± 0.43%) -0.03s (- 0.25%) 9.92s 10.09s
Angular - node (v8.9.0, x86)
Memory used 199,825k (± 0.02%) 200,582k (± 0.03%) +757k (+ 0.38%) 200,500k 200,728k
Parse Time 2.04s (± 0.91%) 2.03s (± 0.52%) -0.00s (- 0.20%) 2.01s 2.06s
Bind Time 1.05s (± 0.79%) 1.05s (± 0.78%) +0.01s (+ 0.76%) 1.04s 1.08s
Check Time 5.00s (± 0.39%) 4.91s (± 0.61%) -0.09s (- 1.78%) 4.84s 4.97s
Emit Time 6.14s (± 1.66%) 6.00s (± 1.44%) -0.14s (- 2.36%) 5.90s 6.24s
Total Time 14.22s (± 0.78%) 13.99s (± 0.56%) -0.23s (- 1.61%) 13.88s 14.24s
Monaco - node (v8.9.0, x86)
Memory used 203,721k (± 0.02%) 203,422k (± 0.02%) -299k (- 0.15%) 203,336k 203,515k
Parse Time 1.60s (± 0.68%) 1.60s (± 0.39%) -0.00s (- 0.19%) 1.58s 1.61s
Bind Time 0.77s (± 0.44%) 0.77s (± 0.80%) +0.00s (+ 0.52%) 0.76s 0.78s
Check Time 5.15s (± 1.68%) 5.22s (± 1.51%) +0.07s (+ 1.46%) 5.12s 5.43s
Emit Time 3.13s (± 2.71%) 3.11s (± 2.76%) -0.02s (- 0.67%) 2.84s 3.26s
Total Time 10.65s (± 0.28%) 10.71s (± 0.48%) +0.06s (+ 0.54%) 10.63s 10.84s
TFS - node (v8.9.0, x86)
Memory used 182,569k (± 0.02%) 182,125k (± 0.02%) -444k (- 0.24%) 182,058k 182,176k
Parse Time 1.31s (± 1.19%) 1.30s (± 0.63%) -0.01s (- 0.61%) 1.28s 1.31s
Bind Time 0.71s (± 0.63%) 0.71s (± 0.63%) -0.00s (- 0.56%) 0.70s 0.72s
Check Time 4.57s (± 0.44%) 4.57s (± 0.57%) -0.00s (- 0.11%) 4.51s 4.65s
Emit Time 2.94s (± 1.03%) 2.95s (± 0.72%) +0.00s (+ 0.14%) 2.88s 2.98s
Total Time 9.54s (± 0.43%) 9.52s (± 0.22%) -0.01s (- 0.14%) 9.46s 9.57s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-166-generic
Architecturex64
Available Memory16 GB
Available Memory4 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v8.9.0, x64)
  • node (v8.9.0, x86)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v8.9.0, x64)
  • Angular - node (v8.9.0, x86)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v8.9.0, x64)
  • Monaco - node (v8.9.0, x86)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v8.9.0, x64)
  • TFS - node (v8.9.0, x86)
Benchmark Name Iterations
Current 36576 10
Baseline master 10

@ahejlsberg ahejlsberg added the Experiment A fork with an experimental idea which might not make it into master label Feb 5, 2020
@ahejlsberg
Copy link
Member Author

@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 29, 2020

Heya @ahejlsberg, I've started to run the perf test suite on this PR at 979bc6a. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - master..36576

Metric master 36576 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 334,373k (± 0.02%) 333,633k (± 0.05%) -740k (- 0.22%) 333,127k 333,851k
Parse Time 1.62s (± 0.62%) 1.62s (± 0.48%) -0.00s (- 0.06%) 1.60s 1.63s
Bind Time 0.89s (± 0.65%) 0.88s (± 1.05%) -0.01s (- 0.90%) 0.86s 0.90s
Check Time 4.72s (± 0.59%) 4.73s (± 0.47%) +0.01s (+ 0.25%) 4.69s 4.78s
Emit Time 5.26s (± 0.44%) 5.31s (± 0.96%) +0.05s (+ 0.86%) 5.23s 5.46s
Total Time 12.49s (± 0.38%) 12.54s (± 0.49%) +0.05s (+ 0.41%) 12.43s 12.68s
Monaco - node (v10.16.3, x64)
Memory used 335,209k (± 0.01%) 334,713k (± 0.02%) -496k (- 0.15%) 334,598k 334,847k
Parse Time 1.25s (± 0.38%) 1.25s (± 0.36%) -0.00s (- 0.08%) 1.24s 1.26s
Bind Time 0.77s (± 0.61%) 0.77s (± 0.47%) +0.00s (+ 0.52%) 0.77s 0.78s
Check Time 4.71s (± 0.27%) 4.72s (± 0.49%) +0.01s (+ 0.21%) 4.68s 4.77s
Emit Time 2.91s (± 0.39%) 2.92s (± 1.06%) +0.01s (+ 0.41%) 2.88s 2.99s
Total Time 9.64s (± 0.25%) 9.67s (± 0.48%) +0.03s (+ 0.27%) 9.59s 9.76s
TFS - node (v10.16.3, x64)
Memory used 299,429k (± 0.01%) 298,573k (± 0.02%) -856k (- 0.29%) 298,451k 298,694k
Parse Time 0.93s (± 0.96%) 0.94s (± 0.80%) +0.00s (+ 0.21%) 0.92s 0.95s
Bind Time 0.75s (± 0.66%) 0.74s (± 0.46%) -0.00s (- 0.40%) 0.74s 0.75s
Check Time 4.26s (± 0.66%) 4.27s (± 0.41%) +0.00s (+ 0.12%) 4.23s 4.32s
Emit Time 3.02s (± 1.48%) 3.06s (± 0.83%) +0.04s (+ 1.26%) 2.98s 3.11s
Total Time 8.96s (± 0.50%) 9.01s (± 0.47%) +0.04s (+ 0.46%) 8.91s 9.11s
material-ui - node (v10.16.3, x64)
Memory used 488,909k (± 0.01%) 480,831k (± 0.01%) -8,079k (- 1.65%) 480,708k 480,900k
Parse Time 1.77s (± 0.51%) 1.76s (± 0.51%) -0.00s (- 0.23%) 1.74s 1.78s
Bind Time 0.68s (± 0.69%) 0.69s (± 0.53%) +0.01s (+ 0.88%) 0.68s 0.69s
Check Time 13.49s (± 0.45%) 13.92s (± 0.54%) +0.43s (+ 3.20%) 13.76s 14.09s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.93s (± 0.39%) 16.37s (± 0.42%) +0.43s (+ 2.70%) 16.23s 16.52s
Angular - node (v12.1.0, x64)
Memory used 310,160k (± 0.02%) 309,402k (± 0.03%) -758k (- 0.24%) 309,268k 309,545k
Parse Time 1.57s (± 0.49%) 1.56s (± 0.74%) -0.01s (- 0.89%) 1.53s 1.59s
Bind Time 0.87s (± 0.79%) 0.86s (± 0.79%) -0.00s (- 0.12%) 0.85s 0.88s
Check Time 4.61s (± 0.56%) 4.61s (± 0.61%) -0.00s (- 0.11%) 4.57s 4.71s
Emit Time 5.47s (± 0.47%) 5.43s (± 0.37%) -0.04s (- 0.77%) 5.39s 5.48s
Total Time 12.52s (± 0.23%) 12.46s (± 0.32%) -0.06s (- 0.45%) 12.41s 12.60s
Monaco - node (v12.1.0, x64)
Memory used 315,202k (± 0.02%) 314,700k (± 0.01%) -502k (- 0.16%) 314,615k 314,765k
Parse Time 1.20s (± 0.39%) 1.20s (± 0.70%) +0.00s (+ 0.08%) 1.19s 1.22s
Bind Time 0.74s (± 1.10%) 0.74s (± 0.63%) -0.00s (- 0.40%) 0.73s 0.75s
Check Time 4.54s (± 0.39%) 4.54s (± 0.37%) +0.00s (+ 0.04%) 4.50s 4.59s
Emit Time 2.96s (± 0.83%) 2.95s (± 0.65%) -0.01s (- 0.41%) 2.91s 2.99s
Total Time 9.44s (± 0.35%) 9.43s (± 0.29%) -0.01s (- 0.13%) 9.38s 9.50s
TFS - node (v12.1.0, x64)
Memory used 281,719k (± 0.02%) 280,837k (± 0.02%) -882k (- 0.31%) 280,737k 280,987k
Parse Time 0.92s (± 0.75%) 0.92s (± 1.08%) +0.01s (+ 0.55%) 0.90s 0.95s
Bind Time 0.70s (± 1.17%) 0.71s (± 0.52%) +0.00s (+ 0.28%) 0.70s 0.71s
Check Time 4.16s (± 0.36%) 4.16s (± 0.49%) +0.00s (+ 0.02%) 4.10s 4.21s
Emit Time 3.08s (± 1.19%) 3.08s (± 0.40%) +0.01s (+ 0.20%) 3.05s 3.10s
Total Time 8.86s (± 0.52%) 8.86s (± 0.22%) +0.01s (+ 0.10%) 8.83s 8.93s
material-ui - node (v12.1.0, x64)
Memory used 466,274k (± 0.01%) 457,835k (± 0.06%) -8,439k (- 1.81%) 457,275k 458,327k
Parse Time 1.74s (± 0.64%) 1.74s (± 0.43%) -0.01s (- 0.40%) 1.72s 1.75s
Bind Time 0.62s (± 0.64%) 0.62s (± 0.79%) +0.00s (+ 0.48%) 0.61s 0.63s
Check Time 12.01s (± 0.43%) 12.50s (± 0.88%) +0.49s (+ 4.10%) 12.24s 12.71s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 14.37s (± 0.42%) 14.86s (± 0.75%) +0.48s (+ 3.37%) 14.58s 15.08s
Angular - node (v8.9.0, x64)
Memory used 329,327k (± 0.01%) 328,606k (± 0.01%) -721k (- 0.22%) 328,509k 328,671k
Parse Time 2.11s (± 0.45%) 2.10s (± 0.67%) -0.01s (- 0.43%) 2.07s 2.13s
Bind Time 0.92s (± 0.72%) 0.92s (± 0.52%) -0.00s (- 0.33%) 0.90s 0.92s
Check Time 5.48s (± 0.43%) 5.45s (± 0.60%) -0.02s (- 0.42%) 5.41s 5.58s
Emit Time 6.26s (± 0.34%) 6.17s (± 0.58%) -0.09s (- 1.42%) 6.09s 6.25s
Total Time 14.77s (± 0.21%) 14.64s (± 0.31%) -0.13s (- 0.86%) 14.55s 14.73s
Monaco - node (v8.9.0, x64)
Memory used 333,567k (± 0.03%) 332,968k (± 0.01%) -599k (- 0.18%) 332,905k 333,052k
Parse Time 1.54s (± 0.50%) 1.54s (± 0.40%) -0.00s (- 0.13%) 1.53s 1.55s
Bind Time 0.89s (± 0.90%) 0.89s (± 0.85%) +0.00s (+ 0.22%) 0.88s 0.91s
Check Time 5.38s (± 0.35%) 5.39s (± 0.43%) +0.01s (+ 0.19%) 5.34s 5.46s
Emit Time 3.55s (± 0.56%) 3.53s (± 0.61%) -0.01s (- 0.42%) 3.48s 3.58s
Total Time 11.36s (± 0.30%) 11.36s (± 0.26%) -0.00s (- 0.04%) 11.29s 11.41s
TFS - node (v8.9.0, x64)
Memory used 298,796k (± 0.01%) 297,945k (± 0.02%) -852k (- 0.28%) 297,835k 298,035k
Parse Time 1.24s (± 0.40%) 1.25s (± 0.29%) +0.01s (+ 0.72%) 1.25s 1.26s
Bind Time 0.75s (± 0.80%) 0.75s (± 0.49%) +0.00s (+ 0.13%) 0.74s 0.75s
Check Time 4.80s (± 0.57%) 4.80s (± 0.53%) -0.00s (- 0.00%) 4.75s 4.86s
Emit Time 3.34s (± 0.96%) 3.39s (± 1.07%) +0.06s (+ 1.68%) 3.28s 3.47s
Total Time 10.13s (± 0.37%) 10.19s (± 0.36%) +0.06s (+ 0.63%) 10.12s 10.28s
material-ui - node (v8.9.0, x64)
Memory used 494,684k (± 0.01%) 484,189k (± 0.01%) -10,494k (- 2.12%) 484,044k 484,299k
Parse Time 2.10s (± 0.35%) 2.10s (± 0.57%) -0.00s (- 0.14%) 2.07s 2.13s
Bind Time 0.81s (± 0.61%) 0.80s (± 1.49%) -0.00s (- 0.37%) 0.78s 0.83s
Check Time 19.39s (± 0.28%) 18.45s (± 1.26%) 🟩-0.94s (- 4.82%) 17.94s 19.01s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 22.29s (± 0.25%) 21.35s (± 1.10%) 🟩-0.93s (- 4.19%) 20.84s 21.93s
Angular - node (v8.9.0, x86)
Memory used 188,914k (± 0.03%) 188,536k (± 0.03%) -378k (- 0.20%) 188,450k 188,684k
Parse Time 2.04s (± 0.72%) 2.05s (± 0.51%) +0.01s (+ 0.34%) 2.02s 2.07s
Bind Time 1.06s (± 0.58%) 1.07s (± 0.54%) +0.01s (+ 0.85%) 1.06s 1.08s
Check Time 4.99s (± 0.33%) 5.00s (± 0.30%) +0.01s (+ 0.20%) 4.97s 5.04s
Emit Time 6.14s (± 1.18%) 6.10s (± 1.28%) -0.04s (- 0.67%) 6.00s 6.39s
Total Time 14.23s (± 0.56%) 14.21s (± 0.66%) -0.02s (- 0.12%) 14.10s 14.56s
Monaco - node (v8.9.0, x86)
Memory used 189,192k (± 0.01%) 188,919k (± 0.02%) -273k (- 0.14%) 188,829k 189,007k
Parse Time 1.58s (± 0.30%) 1.58s (± 0.61%) +0.00s (+ 0.25%) 1.57s 1.61s
Bind Time 0.76s (± 0.78%) 0.76s (± 0.64%) -0.00s (- 0.13%) 0.76s 0.78s
Check Time 5.28s (± 2.08%) 5.34s (± 1.48%) +0.06s (+ 1.08%) 5.16s 5.48s
Emit Time 3.02s (± 3.58%) 2.96s (± 3.68%) -0.06s (- 1.86%) 2.84s 3.24s
Total Time 10.63s (± 0.25%) 10.64s (± 0.42%) +0.01s (+ 0.08%) 10.56s 10.77s
TFS - node (v8.9.0, x86)
Memory used 170,420k (± 0.03%) 169,921k (± 0.03%) -499k (- 0.29%) 169,825k 170,047k
Parse Time 1.28s (± 0.47%) 1.27s (± 0.39%) -0.00s (- 0.16%) 1.26s 1.28s
Bind Time 0.71s (± 1.33%) 0.71s (± 0.69%) -0.00s (- 0.14%) 0.71s 0.73s
Check Time 4.58s (± 0.37%) 4.58s (± 0.54%) 0.00s ( 0.00%) 4.54s 4.65s
Emit Time 2.94s (± 1.26%) 2.96s (± 1.09%) +0.02s (+ 0.54%) 2.88s 3.04s
Total Time 9.52s (± 0.47%) 9.53s (± 0.45%) +0.01s (+ 0.13%) 9.44s 9.62s
material-ui - node (v8.9.0, x86)
Memory used 277,184k (± 0.01%) 271,968k (± 0.01%) -5,216k (- 1.88%) 271,891k 272,011k
Parse Time 2.17s (± 0.46%) 2.16s (± 0.42%) -0.02s (- 0.69%) 2.14s 2.18s
Bind Time 0.68s (± 1.38%) 0.68s (± 1.50%) +0.00s (+ 0.15%) 0.66s 0.71s
Check Time 17.48s (± 0.47%) 17.08s (± 0.62%) -0.41s (- 2.32%) 16.85s 17.28s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 20.33s (± 0.42%) 19.92s (± 0.51%) -0.42s (- 2.05%) 19.68s 20.12s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-166-generic
Architecturex64
Available Memory16 GB
Available Memory1 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v8.9.0, x64)
  • node (v8.9.0, x86)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v8.9.0, x64)
  • Angular - node (v8.9.0, x86)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v8.9.0, x64)
  • Monaco - node (v8.9.0, x86)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v8.9.0, x64)
  • TFS - node (v8.9.0, x86)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v8.9.0, x64)
  • material-ui - node (v8.9.0, x86)
Benchmark Name Iterations
Current 36576 10
Baseline master 10

@ahejlsberg
Copy link
Member Author

@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 5, 2020

Heya @ahejlsberg, I've started to run the perf test suite on this PR at c7d3806. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - master..36576

Metric master 36576 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 333,987k (± 0.02%) 332,582k (± 0.02%) -1,405k (- 0.42%) 332,397k 332,756k
Parse Time 1.62s (± 0.57%) 1.62s (± 0.52%) -0.00s (- 0.06%) 1.61s 1.65s
Bind Time 0.89s (± 1.08%) 0.89s (± 1.14%) +0.00s (+ 0.00%) 0.87s 0.91s
Check Time 4.73s (± 0.35%) 4.73s (± 0.35%) +0.01s (+ 0.15%) 4.70s 4.77s
Emit Time 5.32s (± 1.57%) 5.30s (± 0.79%) -0.02s (- 0.30%) 5.22s 5.41s
Total Time 12.56s (± 0.67%) 12.54s (± 0.41%) -0.01s (- 0.10%) 12.43s 12.66s
Monaco - node (v10.16.3, x64)
Memory used 335,330k (± 0.02%) 334,721k (± 0.02%) -609k (- 0.18%) 334,536k 334,836k
Parse Time 1.26s (± 0.71%) 1.25s (± 0.48%) -0.00s (- 0.08%) 1.24s 1.27s
Bind Time 0.78s (± 0.51%) 0.77s (± 0.38%) -0.01s (- 0.90%) 0.77s 0.78s
Check Time 4.72s (± 0.53%) 4.72s (± 0.72%) -0.00s (- 0.08%) 4.67s 4.80s
Emit Time 2.93s (± 0.52%) 2.91s (± 0.50%) -0.02s (- 0.65%) 2.89s 2.94s
Total Time 9.69s (± 0.36%) 9.66s (± 0.44%) -0.03s (- 0.31%) 9.59s 9.78s
TFS - node (v10.16.3, x64)
Memory used 299,503k (± 0.02%) 298,771k (± 0.02%) -732k (- 0.24%) 298,621k 298,867k
Parse Time 0.94s (± 0.47%) 0.95s (± 0.49%) +0.01s (+ 0.85%) 0.94s 0.96s
Bind Time 0.75s (± 0.78%) 0.74s (± 0.50%) -0.00s (- 0.27%) 0.74s 0.75s
Check Time 4.25s (± 0.43%) 4.26s (± 0.52%) +0.01s (+ 0.28%) 4.22s 4.31s
Emit Time 3.05s (± 0.75%) 3.04s (± 0.80%) -0.01s (- 0.33%) 3.00s 3.10s
Total Time 8.99s (± 0.47%) 8.99s (± 0.33%) +0.01s (+ 0.07%) 8.95s 9.09s
material-ui - node (v10.16.3, x64)
Memory used 488,631k (± 0.02%) 457,696k (± 0.01%) 🟩-30,935k (- 6.33%) 457,546k 457,798k
Parse Time 1.78s (± 0.43%) 1.77s (± 0.41%) -0.00s (- 0.23%) 1.76s 1.79s
Bind Time 0.68s (± 1.03%) 0.68s (± 0.98%) -0.00s (- 0.15%) 0.67s 0.69s
Check Time 13.55s (± 0.60%) 13.58s (± 0.68%) +0.03s (+ 0.24%) 13.45s 13.88s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 16.00s (± 0.50%) 16.03s (± 0.60%) +0.03s (+ 0.19%) 15.90s 16.35s
Angular - node (v12.1.0, x64)
Memory used 309,880k (± 0.02%) 308,346k (± 0.06%) -1,535k (- 0.50%) 307,602k 308,657k
Parse Time 1.57s (± 0.73%) 1.57s (± 0.68%) -0.00s (- 0.06%) 1.55s 1.59s
Bind Time 0.87s (± 0.94%) 0.87s (± 0.74%) +0.00s (+ 0.23%) 0.86s 0.89s
Check Time 4.61s (± 0.46%) 4.65s (± 1.24%) +0.03s (+ 0.67%) 4.58s 4.85s
Emit Time 5.45s (± 0.29%) 5.44s (± 0.91%) -0.00s (- 0.04%) 5.35s 5.57s
Total Time 12.50s (± 0.26%) 12.53s (± 0.82%) +0.03s (+ 0.20%) 12.38s 12.87s
Monaco - node (v12.1.0, x64)
Memory used 315,292k (± 0.02%) 314,686k (± 0.02%) -607k (- 0.19%) 314,581k 314,898k
Parse Time 1.21s (± 0.53%) 1.21s (± 0.64%) -0.00s (- 0.08%) 1.19s 1.23s
Bind Time 0.74s (± 0.70%) 0.74s (± 1.05%) +0.00s (+ 0.27%) 0.73s 0.76s
Check Time 4.55s (± 0.47%) 4.54s (± 0.33%) -0.01s (- 0.18%) 4.52s 4.59s
Emit Time 2.95s (± 0.70%) 2.95s (± 0.58%) -0.00s (- 0.14%) 2.92s 2.98s
Total Time 9.45s (± 0.36%) 9.44s (± 0.21%) -0.01s (- 0.14%) 9.40s 9.49s
TFS - node (v12.1.0, x64)
Memory used 281,772k (± 0.02%) 281,035k (± 0.02%) -737k (- 0.26%) 280,967k 281,194k
Parse Time 0.93s (± 0.97%) 0.93s (± 0.86%) +0.00s (+ 0.32%) 0.91s 0.95s
Bind Time 0.70s (± 1.14%) 0.71s (± 1.47%) +0.01s (+ 0.85%) 0.69s 0.73s
Check Time 4.18s (± 0.61%) 4.17s (± 0.29%) -0.01s (- 0.29%) 4.13s 4.19s
Emit Time 3.08s (± 0.64%) 3.07s (± 0.95%) -0.01s (- 0.32%) 3.02s 3.17s
Total Time 8.89s (± 0.36%) 8.88s (± 0.35%) -0.01s (- 0.15%) 8.84s 8.99s
material-ui - node (v12.1.0, x64)
Memory used 466,066k (± 0.01%) 435,105k (± 0.02%) 🟩-30,962k (- 6.64%) 434,923k 435,236k
Parse Time 1.75s (± 0.57%) 1.75s (± 0.50%) 0.00s ( 0.00%) 1.74s 1.78s
Bind Time 0.63s (± 0.64%) 0.63s (± 1.07%) -0.00s (- 0.32%) 0.61s 0.64s
Check Time 12.04s (± 0.46%) 12.04s (± 0.53%) -0.00s (- 0.03%) 11.86s 12.15s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 14.42s (± 0.37%) 14.42s (± 0.45%) -0.01s (- 0.03%) 14.24s 14.51s
Angular - node (v8.9.0, x64)
Memory used 329,073k (± 0.02%) 327,660k (± 0.01%) -1,413k (- 0.43%) 327,621k 327,693k
Parse Time 2.12s (± 0.32%) 2.10s (± 0.32%) -0.01s (- 0.61%) 2.09s 2.12s
Bind Time 0.93s (± 1.02%) 0.92s (± 0.52%) -0.01s (- 1.08%) 0.91s 0.93s
Check Time 5.54s (± 0.56%) 5.49s (± 0.64%) -0.05s (- 0.90%) 5.44s 5.58s
Emit Time 6.25s (± 0.73%) 6.19s (± 0.85%) -0.06s (- 0.90%) 6.02s 6.26s
Total Time 14.83s (± 0.33%) 14.70s (± 0.46%) -0.13s (- 0.86%) 14.55s 14.83s
Monaco - node (v8.9.0, x64)
Memory used 333,594k (± 0.01%) 332,965k (± 0.02%) -629k (- 0.19%) 332,850k 333,072k
Parse Time 1.54s (± 0.65%) 1.55s (± 0.49%) +0.00s (+ 0.13%) 1.53s 1.56s
Bind Time 0.91s (± 0.89%) 0.91s (± 1.16%) -0.00s (- 0.33%) 0.89s 0.93s
Check Time 5.39s (± 0.80%) 5.40s (± 0.47%) +0.00s (+ 0.00%) 5.33s 5.45s
Emit Time 3.51s (± 0.75%) 3.52s (± 0.55%) +0.01s (+ 0.23%) 3.48s 3.56s
Total Time 11.36s (± 0.56%) 11.37s (± 0.28%) +0.01s (+ 0.05%) 11.29s 11.43s
TFS - node (v8.9.0, x64)
Memory used 298,949k (± 0.01%) 298,117k (± 0.02%) -833k (- 0.28%) 297,972k 298,261k
Parse Time 1.25s (± 0.60%) 1.25s (± 0.39%) +0.00s (+ 0.08%) 1.24s 1.26s
Bind Time 0.75s (± 1.00%) 0.75s (± 0.69%) +0.00s (+ 0.27%) 0.74s 0.76s
Check Time 4.87s (± 1.61%) 4.89s (± 1.39%) +0.02s (+ 0.43%) 4.80s 5.10s
Emit Time 3.27s (± 2.48%) 3.30s (± 2.31%) +0.03s (+ 0.98%) 3.12s 3.43s
Total Time 10.14s (± 0.37%) 10.20s (± 0.51%) +0.06s (+ 0.55%) 10.10s 10.30s
material-ui - node (v8.9.0, x64)
Memory used 494,433k (± 0.01%) 460,215k (± 0.01%) 🟩-34,218k (- 6.92%) 460,118k 460,314k
Parse Time 2.10s (± 0.74%) 2.11s (± 0.75%) +0.01s (+ 0.38%) 2.08s 2.15s
Bind Time 0.81s (± 0.99%) 0.81s (± 0.58%) -0.00s (- 0.25%) 0.80s 0.82s
Check Time 19.52s (± 0.49%) 17.73s (± 0.67%) 🟩-1.79s (- 9.17%) 17.44s 17.98s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 22.43s (± 0.44%) 20.65s (± 0.60%) 🟩-1.78s (- 7.94%) 20.36s 20.88s
Angular - node (v8.9.0, x86)
Memory used 188,756k (± 0.02%) 188,053k (± 0.02%) -703k (- 0.37%) 187,957k 188,118k
Parse Time 2.05s (± 0.63%) 2.04s (± 0.61%) -0.01s (- 0.54%) 2.02s 2.07s
Bind Time 1.07s (± 0.52%) 1.08s (± 0.21%) +0.01s (+ 0.65%) 1.07s 1.08s
Check Time 5.03s (± 0.50%) 5.01s (± 0.57%) -0.01s (- 0.26%) 4.96s 5.11s
Emit Time 6.12s (± 0.62%) 6.10s (± 0.68%) -0.03s (- 0.42%) 6.05s 6.22s
Total Time 14.28s (± 0.42%) 14.23s (± 0.46%) -0.05s (- 0.33%) 14.11s 14.45s
Monaco - node (v8.9.0, x86)
Memory used 189,236k (± 0.02%) 188,924k (± 0.03%) -313k (- 0.17%) 188,768k 188,995k
Parse Time 1.59s (± 0.81%) 1.59s (± 0.61%) -0.00s (- 0.25%) 1.57s 1.61s
Bind Time 0.77s (± 0.76%) 0.77s (± 0.47%) -0.00s (- 0.13%) 0.76s 0.77s
Check Time 5.32s (± 1.66%) 5.41s (± 1.47%) +0.09s (+ 1.75%) 5.21s 5.53s
Emit Time 3.05s (± 3.71%) 2.94s (± 2.57%) 🟩-0.11s (- 3.48%) 2.84s 3.10s
Total Time 10.73s (± 0.49%) 10.71s (± 0.58%) -0.02s (- 0.20%) 10.62s 10.93s
TFS - node (v8.9.0, x86)
Memory used 170,490k (± 0.02%) 170,111k (± 0.02%) -380k (- 0.22%) 170,041k 170,182k
Parse Time 1.29s (± 0.74%) 1.29s (± 2.28%) +0.01s (+ 0.47%) 1.27s 1.41s
Bind Time 0.71s (± 0.42%) 0.72s (± 1.73%) +0.01s (+ 1.12%) 0.70s 0.76s
Check Time 4.61s (± 0.52%) 4.62s (± 0.77%) +0.00s (+ 0.04%) 4.55s 4.71s
Emit Time 2.96s (± 0.99%) 2.97s (± 1.08%) +0.01s (+ 0.34%) 2.91s 3.05s
Total Time 9.57s (± 0.51%) 9.60s (± 0.76%) +0.02s (+ 0.24%) 9.49s 9.77s
material-ui - node (v8.9.0, x86)
Memory used 277,026k (± 0.01%) 259,944k (± 0.01%) 🟩-17,082k (- 6.17%) 259,895k 259,985k
Parse Time 2.17s (± 0.48%) 2.18s (± 0.62%) +0.01s (+ 0.60%) 2.15s 2.21s
Bind Time 0.68s (± 0.44%) 0.68s (± 1.30%) +0.01s (+ 0.88%) 0.67s 0.71s
Check Time 17.81s (± 0.81%) 16.18s (± 0.61%) 🟩-1.64s (- 9.18%) 16.00s 16.45s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 20.66s (± 0.73%) 19.04s (± 0.54%) 🟩-1.61s (- 7.82%) 18.82s 19.30s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-166-generic
Architecturex64
Available Memory16 GB
Available Memory1 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v8.9.0, x64)
  • node (v8.9.0, x86)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v8.9.0, x64)
  • Angular - node (v8.9.0, x86)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v8.9.0, x64)
  • Monaco - node (v8.9.0, x86)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v8.9.0, x64)
  • TFS - node (v8.9.0, x86)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v8.9.0, x64)
  • material-ui - node (v8.9.0, x86)
Benchmark Name Iterations
Current 36576 10
Baseline master 10

@ahejlsberg
Copy link
Member Author

@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 5, 2020

Heya @ahejlsberg, I've started to run the perf test suite on this PR at 61f0c7a. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - master..36576

Metric master 36576 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 334,503k (± 0.02%) 332,335k (± 0.03%) -2,168k (- 0.65%) 332,166k 332,613k
Parse Time 1.63s (± 0.54%) 1.63s (± 0.54%) -0.00s (- 0.18%) 1.61s 1.65s
Bind Time 0.89s (± 0.75%) 0.89s (± 0.75%) -0.00s (- 0.34%) 0.87s 0.90s
Check Time 4.72s (± 0.47%) 4.73s (± 0.29%) +0.01s (+ 0.23%) 4.70s 4.76s
Emit Time 5.29s (± 0.37%) 5.28s (± 0.78%) -0.01s (- 0.25%) 5.21s 5.41s
Total Time 12.53s (± 0.29%) 12.53s (± 0.41%) -0.00s (- 0.02%) 12.44s 12.68s
Monaco - node (v10.16.3, x64)
Memory used 335,321k (± 0.01%) 334,341k (± 0.01%) -980k (- 0.29%) 334,234k 334,470k
Parse Time 1.25s (± 0.32%) 1.26s (± 0.93%) +0.01s (+ 0.80%) 1.23s 1.29s
Bind Time 0.77s (± 0.67%) 0.78s (± 0.60%) +0.01s (+ 1.17%) 0.77s 0.79s
Check Time 4.72s (± 0.24%) 4.72s (± 0.52%) +0.00s (+ 0.06%) 4.66s 4.77s
Emit Time 2.91s (± 0.65%) 2.95s (± 1.19%) +0.04s (+ 1.37%) 2.87s 3.03s
Total Time 9.65s (± 0.30%) 9.72s (± 0.52%) +0.06s (+ 0.65%) 9.57s 9.80s
TFS - node (v10.16.3, x64)
Memory used 299,490k (± 0.02%) 298,517k (± 0.03%) -973k (- 0.32%) 298,405k 298,818k
Parse Time 0.95s (± 0.50%) 0.95s (± 0.68%) +0.01s (+ 0.53%) 0.94s 0.97s
Bind Time 0.75s (± 0.66%) 0.75s (± 0.63%) +0.00s (+ 0.54%) 0.74s 0.76s
Check Time 4.26s (± 0.41%) 4.27s (± 0.68%) +0.02s (+ 0.38%) 4.22s 4.34s
Emit Time 3.06s (± 0.78%) 3.06s (± 0.56%) -0.00s (- 0.13%) 3.03s 3.11s
Total Time 9.01s (± 0.38%) 9.03s (± 0.42%) +0.02s (+ 0.23%) 8.95s 9.12s
material-ui - node (v10.16.3, x64)
Memory used 489,056k (± 0.01%) 452,761k (± 0.01%) 🟩-36,294k (- 7.42%) 452,682k 452,885k
Parse Time 1.77s (± 0.53%) 1.78s (± 0.58%) +0.01s (+ 0.51%) 1.76s 1.80s
Bind Time 0.68s (± 0.87%) 0.68s (± 0.87%) 0.00s ( 0.00%) 0.67s 0.70s
Check Time 13.59s (± 0.73%) 13.62s (± 0.54%) +0.03s (+ 0.22%) 13.47s 13.77s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 16.04s (± 0.59%) 16.08s (± 0.49%) +0.04s (+ 0.24%) 15.91s 16.25s
Angular - node (v12.1.0, x64)
Memory used 310,249k (± 0.03%) 308,180k (± 0.02%) -2,069k (- 0.67%) 308,027k 308,348k
Parse Time 1.58s (± 0.68%) 1.58s (± 0.42%) -0.00s (- 0.13%) 1.57s 1.59s
Bind Time 0.87s (± 1.19%) 0.88s (± 0.86%) +0.00s (+ 0.46%) 0.86s 0.89s
Check Time 4.61s (± 0.66%) 4.63s (± 0.54%) +0.02s (+ 0.39%) 4.59s 4.68s
Emit Time 5.46s (± 0.41%) 5.44s (± 0.50%) -0.02s (- 0.29%) 5.38s 5.50s
Total Time 12.53s (± 0.45%) 12.52s (± 0.33%) -0.00s (- 0.01%) 12.46s 12.63s
Monaco - node (v12.1.0, x64)
Memory used 315,274k (± 0.02%) 314,234k (± 0.02%) -1,040k (- 0.33%) 314,131k 314,405k
Parse Time 1.21s (± 0.89%) 1.21s (± 0.83%) +0.01s (+ 0.50%) 1.19s 1.24s
Bind Time 0.74s (± 0.60%) 0.74s (± 0.70%) +0.00s (+ 0.14%) 0.73s 0.75s
Check Time 4.53s (± 0.45%) 4.56s (± 0.45%) +0.03s (+ 0.68%) 4.49s 4.59s
Emit Time 2.95s (± 0.38%) 2.95s (± 0.61%) +0.00s (+ 0.17%) 2.92s 2.98s
Total Time 9.42s (± 0.24%) 9.47s (± 0.37%) +0.05s (+ 0.52%) 9.35s 9.53s
TFS - node (v12.1.0, x64)
Memory used 281,749k (± 0.02%) 280,739k (± 0.01%) -1,010k (- 0.36%) 280,670k 280,793k
Parse Time 0.93s (± 0.78%) 0.94s (± 1.02%) +0.00s (+ 0.43%) 0.92s 0.96s
Bind Time 0.70s (± 0.57%) 0.70s (± 0.70%) +0.00s (+ 0.72%) 0.69s 0.71s
Check Time 4.16s (± 0.57%) 4.19s (± 0.27%) +0.03s (+ 0.82%) 4.17s 4.22s
Emit Time 3.08s (± 1.07%) 3.10s (± 0.59%) +0.02s (+ 0.52%) 3.06s 3.13s
Total Time 8.87s (± 0.58%) 8.93s (± 0.29%) +0.05s (+ 0.61%) 8.86s 8.98s
material-ui - node (v12.1.0, x64)
Memory used 466,377k (± 0.05%) 430,118k (± 0.05%) 🟩-36,259k (- 7.77%) 429,318k 430,357k
Parse Time 1.75s (± 0.52%) 1.75s (± 0.43%) +0.00s (+ 0.17%) 1.74s 1.77s
Bind Time 0.63s (± 0.91%) 0.63s (± 0.83%) -0.00s (- 0.16%) 0.62s 0.64s
Check Time 12.06s (± 1.05%) 12.05s (± 0.69%) -0.01s (- 0.09%) 11.88s 12.23s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 14.44s (± 0.88%) 14.43s (± 0.59%) -0.01s (- 0.06%) 14.27s 14.61s
Angular - node (v8.9.0, x64)
Memory used 329,450k (± 0.02%) 327,386k (± 0.02%) -2,064k (- 0.63%) 327,207k 327,510k
Parse Time 2.10s (± 0.65%) 2.11s (± 0.63%) +0.00s (+ 0.19%) 2.09s 2.14s
Bind Time 0.92s (± 1.35%) 0.92s (± 0.90%) +0.00s (+ 0.11%) 0.91s 0.94s
Check Time 5.50s (± 0.43%) 5.49s (± 0.56%) -0.01s (- 0.16%) 5.42s 5.54s
Emit Time 6.23s (± 0.62%) 6.13s (± 1.11%) -0.10s (- 1.56%) 5.96s 6.31s
Total Time 14.75s (± 0.39%) 14.65s (± 0.53%) -0.10s (- 0.64%) 14.52s 14.93s
Monaco - node (v8.9.0, x64)
Memory used 333,643k (± 0.02%) 332,507k (± 0.02%) -1,136k (- 0.34%) 332,412k 332,620k
Parse Time 1.54s (± 0.43%) 1.54s (± 0.43%) +0.00s (+ 0.20%) 1.53s 1.56s
Bind Time 0.91s (± 0.93%) 0.91s (± 1.22%) -0.00s (- 0.22%) 0.89s 0.93s
Check Time 5.41s (± 0.46%) 5.40s (± 0.55%) -0.01s (- 0.28%) 5.34s 5.46s
Emit Time 3.52s (± 0.30%) 3.52s (± 0.75%) +0.00s (+ 0.09%) 3.49s 3.60s
Total Time 11.37s (± 0.23%) 11.37s (± 0.53%) -0.01s (- 0.06%) 11.27s 11.52s
TFS - node (v8.9.0, x64)
Memory used 298,941k (± 0.02%) 297,899k (± 0.02%) -1,041k (- 0.35%) 297,809k 298,026k
Parse Time 1.25s (± 0.69%) 1.25s (± 0.36%) 0.00s ( 0.00%) 1.24s 1.26s
Bind Time 0.75s (± 0.46%) 0.75s (± 0.63%) +0.00s (+ 0.40%) 0.74s 0.76s
Check Time 4.86s (± 1.96%) 4.89s (± 1.69%) +0.03s (+ 0.62%) 4.75s 5.06s
Emit Time 3.31s (± 2.82%) 3.28s (± 2.67%) -0.03s (- 0.94%) 3.10s 3.42s
Total Time 10.18s (± 0.38%) 10.18s (± 0.53%) 0.00s ( 0.00%) 9.99s 10.27s
material-ui - node (v8.9.0, x64)
Memory used 494,869k (± 0.01%) 455,217k (± 0.01%) 🟩-39,652k (- 8.01%) 455,120k 455,307k
Parse Time 2.11s (± 0.59%) 2.10s (± 0.56%) -0.01s (- 0.33%) 2.08s 2.14s
Bind Time 0.81s (± 1.16%) 0.82s (± 1.08%) +0.01s (+ 0.86%) 0.80s 0.84s
Check Time 19.57s (± 0.73%) 17.54s (± 0.79%) 🟩-2.04s (-10.41%) 17.21s 17.93s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 22.49s (± 0.65%) 20.45s (± 0.67%) 🟩-2.04s (- 9.05%) 20.12s 20.84s
Angular - node (v8.9.0, x86)
Memory used 188,972k (± 0.03%) 187,938k (± 0.02%) -1,034k (- 0.55%) 187,846k 188,042k
Parse Time 2.05s (± 0.62%) 2.05s (± 0.83%) +0.00s (+ 0.24%) 2.02s 2.10s
Bind Time 1.08s (± 1.21%) 1.07s (± 0.52%) -0.01s (- 0.65%) 1.06s 1.09s
Check Time 5.05s (± 0.70%) 5.02s (± 0.59%) -0.03s (- 0.63%) 4.96s 5.07s
Emit Time 6.14s (± 0.77%) 6.15s (± 1.14%) +0.01s (+ 0.18%) 6.03s 6.38s
Total Time 14.32s (± 0.41%) 14.29s (± 0.46%) -0.03s (- 0.20%) 14.16s 14.45s
Monaco - node (v8.9.0, x86)
Memory used 189,278k (± 0.02%) 188,728k (± 0.03%) -551k (- 0.29%) 188,625k 188,918k
Parse Time 1.59s (± 0.59%) 1.58s (± 0.70%) -0.00s (- 0.19%) 1.57s 1.62s
Bind Time 0.77s (± 0.78%) 0.76s (± 0.99%) -0.00s (- 0.13%) 0.75s 0.79s
Check Time 5.33s (± 1.87%) 5.38s (± 1.57%) +0.06s (+ 1.03%) 5.21s 5.54s
Emit Time 3.02s (± 3.70%) 2.96s (± 2.64%) -0.06s (- 1.99%) 2.84s 3.09s
Total Time 10.70s (± 0.66%) 10.69s (± 0.43%) -0.01s (- 0.09%) 10.62s 10.84s
TFS - node (v8.9.0, x86)
Memory used 170,497k (± 0.02%) 169,954k (± 0.02%) -543k (- 0.32%) 169,889k 170,016k
Parse Time 1.28s (± 0.73%) 1.29s (± 0.74%) +0.00s (+ 0.16%) 1.27s 1.31s
Bind Time 0.71s (± 0.81%) 0.72s (± 1.17%) +0.01s (+ 0.84%) 0.71s 0.74s
Check Time 4.62s (± 0.48%) 4.61s (± 0.58%) -0.01s (- 0.17%) 4.55s 4.68s
Emit Time 2.97s (± 1.43%) 2.99s (± 1.42%) +0.02s (+ 0.84%) 2.87s 3.10s
Total Time 9.59s (± 0.64%) 9.61s (± 0.75%) +0.02s (+ 0.23%) 9.41s 9.74s
material-ui - node (v8.9.0, x86)
Memory used 277,258k (± 0.01%) 257,471k (± 0.01%) 🟩-19,787k (- 7.14%) 257,427k 257,526k
Parse Time 2.18s (± 0.51%) 2.18s (± 0.53%) +0.00s (+ 0.05%) 2.16s 2.21s
Bind Time 0.68s (± 1.24%) 0.68s (± 0.95%) -0.00s (- 0.15%) 0.67s 0.70s
Check Time 17.65s (± 0.56%) 16.15s (± 0.95%) 🟩-1.50s (- 8.49%) 15.82s 16.50s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 20.51s (± 0.51%) 19.02s (± 0.84%) 🟩-1.50s (- 7.31%) 18.66s 19.37s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-166-generic
Architecturex64
Available Memory16 GB
Available Memory1 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v8.9.0, x64)
  • node (v8.9.0, x86)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v8.9.0, x64)
  • Angular - node (v8.9.0, x86)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v8.9.0, x64)
  • Monaco - node (v8.9.0, x86)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v8.9.0, x64)
  • TFS - node (v8.9.0, x86)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v8.9.0, x64)
  • material-ui - node (v8.9.0, x86)
Benchmark Name Iterations
Current 36576 10
Baseline master 10

@ahejlsberg
Copy link
Member Author

@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 6, 2020

Heya @ahejlsberg, I've started to run the perf test suite on this PR at 50de2db. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - master..36576

Metric master 36576 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 334,478k (± 0.02%) 332,437k (± 0.01%) -2,041k (- 0.61%) 332,364k 332,537k
Parse Time 1.63s (± 0.87%) 1.62s (± 0.61%) -0.01s (- 0.31%) 1.61s 1.65s
Bind Time 0.89s (± 0.65%) 0.89s (± 0.83%) 0.00s ( 0.00%) 0.87s 0.91s
Check Time 4.73s (± 0.54%) 4.73s (± 0.34%) +0.00s (+ 0.02%) 4.72s 4.78s
Emit Time 5.29s (± 0.79%) 5.29s (± 0.86%) +0.00s (+ 0.04%) 5.18s 5.36s
Total Time 12.54s (± 0.61%) 12.54s (± 0.51%) -0.00s (- 0.04%) 12.41s 12.70s
Monaco - node (v10.16.3, x64)
Memory used 335,292k (± 0.02%) 334,292k (± 0.02%) -1,001k (- 0.30%) 334,142k 334,442k
Parse Time 1.26s (± 0.76%) 1.26s (± 0.91%) +0.00s (+ 0.16%) 1.24s 1.30s
Bind Time 0.77s (± 0.62%) 0.77s (± 0.47%) +0.00s (+ 0.13%) 0.77s 0.78s
Check Time 4.71s (± 0.60%) 4.70s (± 0.33%) -0.00s (- 0.02%) 4.68s 4.74s
Emit Time 2.90s (± 0.62%) 2.92s (± 0.73%) +0.01s (+ 0.45%) 2.88s 2.99s
Total Time 9.64s (± 0.44%) 9.65s (± 0.40%) +0.01s (+ 0.13%) 9.61s 9.80s
TFS - node (v10.16.3, x64)
Memory used 299,482k (± 0.01%) 298,476k (± 0.02%) -1,005k (- 0.34%) 298,390k 298,584k
Parse Time 0.95s (± 0.71%) 0.95s (± 0.38%) -0.00s (- 0.11%) 0.94s 0.95s
Bind Time 0.74s (± 0.92%) 0.74s (± 0.91%) -0.00s (- 0.13%) 0.73s 0.76s
Check Time 4.25s (± 0.48%) 4.26s (± 0.64%) +0.01s (+ 0.16%) 4.21s 4.32s
Emit Time 3.05s (± 1.04%) 3.06s (± 0.73%) +0.01s (+ 0.26%) 3.02s 3.12s
Total Time 9.00s (± 0.61%) 9.01s (± 0.38%) +0.01s (+ 0.07%) 8.93s 9.06s
material-ui - node (v10.16.3, x64)
Memory used 488,973k (± 0.02%) 452,718k (± 0.01%) 🟩-36,255k (- 7.41%) 452,609k 452,787k
Parse Time 1.77s (± 0.38%) 1.77s (± 0.42%) -0.00s (- 0.17%) 1.75s 1.78s
Bind Time 0.68s (± 0.70%) 0.69s (± 0.72%) +0.00s (+ 0.44%) 0.68s 0.70s
Check Time 13.60s (± 0.68%) 13.45s (± 0.48%) -0.15s (- 1.10%) 13.34s 13.61s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 16.05s (± 0.61%) 15.91s (± 0.41%) -0.14s (- 0.90%) 15.79s 16.07s
Angular - node (v12.1.0, x64)
Memory used 310,088k (± 0.09%) 308,077k (± 0.07%) -2,010k (- 0.65%) 307,187k 308,327k
Parse Time 1.57s (± 0.48%) 1.57s (± 0.68%) -0.01s (- 0.32%) 1.55s 1.59s
Bind Time 0.86s (± 0.67%) 0.87s (± 0.57%) +0.00s (+ 0.35%) 0.86s 0.88s
Check Time 4.66s (± 0.67%) 4.64s (± 1.19%) -0.02s (- 0.45%) 4.54s 4.81s
Emit Time 5.47s (± 1.46%) 5.46s (± 0.90%) -0.01s (- 0.18%) 5.38s 5.60s
Total Time 12.57s (± 0.74%) 12.54s (± 0.85%) -0.03s (- 0.24%) 12.40s 12.88s
Monaco - node (v12.1.0, x64)
Memory used 315,274k (± 0.01%) 314,239k (± 0.02%) -1,035k (- 0.33%) 314,042k 314,363k
Parse Time 1.21s (± 0.73%) 1.21s (± 0.70%) -0.00s (- 0.08%) 1.19s 1.22s
Bind Time 0.74s (± 0.88%) 0.74s (± 0.91%) +0.01s (+ 0.81%) 0.73s 0.76s
Check Time 4.55s (± 0.59%) 4.53s (± 0.47%) -0.02s (- 0.37%) 4.48s 4.59s
Emit Time 2.96s (± 0.81%) 2.95s (± 1.03%) -0.01s (- 0.27%) 2.88s 3.04s
Total Time 9.46s (± 0.50%) 9.44s (± 0.21%) -0.02s (- 0.20%) 9.39s 9.47s
TFS - node (v12.1.0, x64)
Memory used 281,779k (± 0.02%) 280,750k (± 0.02%) -1,029k (- 0.37%) 280,662k 280,945k
Parse Time 0.93s (± 0.63%) 0.93s (± 0.80%) +0.01s (+ 0.65%) 0.92s 0.95s
Bind Time 0.71s (± 0.96%) 0.70s (± 1.17%) -0.01s (- 1.27%) 0.68s 0.72s
Check Time 4.16s (± 0.21%) 4.18s (± 0.33%) +0.02s (+ 0.53%) 4.16s 4.21s
Emit Time 3.09s (± 0.84%) 3.06s (± 0.75%) -0.02s (- 0.78%) 2.99s 3.10s
Total Time 8.88s (± 0.28%) 8.87s (± 0.41%) -0.00s (- 0.02%) 8.78s 8.94s
material-ui - node (v12.1.0, x64)
Memory used 466,474k (± 0.01%) 430,175k (± 0.02%) 🟩-36,299k (- 7.78%) 429,963k 430,314k
Parse Time 1.76s (± 0.49%) 1.76s (± 0.54%) -0.01s (- 0.34%) 1.73s 1.77s
Bind Time 0.63s (± 1.06%) 0.62s (± 0.95%) -0.01s (- 1.42%) 0.61s 0.63s
Check Time 12.08s (± 0.57%) 11.99s (± 0.37%) -0.09s (- 0.72%) 11.87s 12.09s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 14.47s (± 0.47%) 14.37s (± 0.30%) -0.10s (- 0.71%) 14.24s 14.45s
Angular - node (v8.9.0, x64)
Memory used 329,462k (± 0.01%) 327,422k (± 0.01%) -2,040k (- 0.62%) 327,370k 327,539k
Parse Time 2.11s (± 0.70%) 2.10s (± 0.45%) -0.02s (- 0.76%) 2.07s 2.12s
Bind Time 0.92s (± 0.64%) 0.92s (± 0.74%) 0.00s ( 0.00%) 0.91s 0.94s
Check Time 5.51s (± 0.60%) 5.51s (± 0.86%) -0.01s (- 0.09%) 5.43s 5.61s
Emit Time 6.24s (± 0.76%) 6.22s (± 0.75%) -0.02s (- 0.29%) 6.11s 6.34s
Total Time 14.79s (± 0.46%) 14.75s (± 0.53%) -0.04s (- 0.24%) 14.56s 14.98s
Monaco - node (v8.9.0, x64)
Memory used 333,604k (± 0.02%) 332,519k (± 0.02%) -1,085k (- 0.33%) 332,403k 332,662k
Parse Time 1.54s (± 0.45%) 1.54s (± 0.45%) +0.00s (+ 0.00%) 1.53s 1.56s
Bind Time 0.91s (± 1.22%) 0.91s (± 1.02%) +0.00s (+ 0.55%) 0.89s 0.93s
Check Time 5.38s (± 0.26%) 5.41s (± 0.52%) +0.03s (+ 0.61%) 5.36s 5.47s
Emit Time 3.51s (± 0.65%) 3.52s (± 0.33%) +0.01s (+ 0.14%) 3.49s 3.54s
Total Time 11.34s (± 0.33%) 11.38s (± 0.29%) +0.04s (+ 0.34%) 11.32s 11.47s
TFS - node (v8.9.0, x64)
Memory used 298,934k (± 0.02%) 297,857k (± 0.02%) -1,077k (- 0.36%) 297,758k 297,974k
Parse Time 1.25s (± 0.42%) 1.25s (± 0.65%) -0.00s (- 0.08%) 1.23s 1.27s
Bind Time 0.75s (± 0.74%) 0.74s (± 0.60%) -0.01s (- 0.80%) 0.73s 0.75s
Check Time 4.89s (± 1.15%) 4.90s (± 1.50%) +0.02s (+ 0.33%) 4.77s 5.06s
Emit Time 3.32s (± 2.22%) 3.30s (± 2.56%) -0.02s (- 0.57%) 3.07s 3.41s
Total Time 10.21s (± 0.40%) 10.19s (± 0.32%) -0.01s (- 0.14%) 10.12s 10.26s
material-ui - node (v8.9.0, x64)
Memory used 494,840k (± 0.01%) 455,188k (± 0.02%) 🟩-39,651k (- 8.01%) 455,003k 455,317k
Parse Time 2.11s (± 0.49%) 2.10s (± 0.61%) -0.02s (- 0.71%) 2.08s 2.14s
Bind Time 0.80s (± 1.10%) 0.81s (± 0.96%) +0.01s (+ 1.38%) 0.80s 0.83s
Check Time 19.58s (± 0.44%) 17.55s (± 0.44%) 🟩-2.02s (-10.34%) 17.36s 17.72s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 22.49s (± 0.39%) 20.46s (± 0.33%) 🟩-2.03s (- 9.01%) 20.33s 20.61s
Angular - node (v8.9.0, x86)
Memory used 189,024k (± 0.03%) 187,930k (± 0.03%) -1,094k (- 0.58%) 187,799k 188,034k
Parse Time 2.05s (± 0.56%) 2.05s (± 0.46%) -0.01s (- 0.34%) 2.03s 2.06s
Bind Time 1.07s (± 0.58%) 1.07s (± 0.81%) +0.00s (+ 0.28%) 1.06s 1.10s
Check Time 5.02s (± 0.59%) 5.01s (± 0.56%) -0.01s (- 0.20%) 4.94s 5.09s
Emit Time 6.15s (± 0.81%) 6.11s (± 1.03%) -0.04s (- 0.67%) 6.02s 6.30s
Total Time 14.29s (± 0.40%) 14.24s (± 0.47%) -0.05s (- 0.38%) 14.09s 14.41s
Monaco - node (v8.9.0, x86)
Memory used 189,254k (± 0.02%) 188,733k (± 0.01%) -521k (- 0.28%) 188,682k 188,806k
Parse Time 1.59s (± 0.77%) 1.59s (± 0.48%) -0.00s (- 0.19%) 1.56s 1.60s
Bind Time 0.78s (± 1.30%) 0.76s (± 0.64%) -0.01s (- 1.55%) 0.76s 0.78s
Check Time 5.33s (± 1.93%) 5.35s (± 1.76%) +0.02s (+ 0.38%) 5.09s 5.48s
Emit Time 3.01s (± 3.55%) 2.98s (± 3.25%) -0.03s (- 0.93%) 2.85s 3.20s
Total Time 10.70s (± 0.33%) 10.68s (± 0.27%) -0.02s (- 0.17%) 10.61s 10.75s
TFS - node (v8.9.0, x86)
Memory used 170,482k (± 0.02%) 169,923k (± 0.02%) -559k (- 0.33%) 169,849k 170,025k
Parse Time 1.29s (± 0.76%) 1.28s (± 0.84%) -0.01s (- 0.54%) 1.27s 1.32s
Bind Time 0.71s (± 0.96%) 0.72s (± 1.06%) +0.00s (+ 0.14%) 0.70s 0.74s
Check Time 4.62s (± 0.99%) 4.62s (± 0.60%) -0.00s (- 0.04%) 4.56s 4.67s
Emit Time 3.01s (± 2.97%) 3.01s (± 2.60%) -0.00s (- 0.13%) 2.88s 3.29s
Total Time 9.63s (± 0.98%) 9.63s (± 0.91%) -0.01s (- 0.06%) 9.48s 9.91s
material-ui - node (v8.9.0, x86)
Memory used 277,280k (± 0.02%) 257,504k (± 0.02%) 🟩-19,776k (- 7.13%) 257,409k 257,574k
Parse Time 2.18s (± 0.34%) 2.18s (± 0.78%) -0.00s (- 0.05%) 2.15s 2.24s
Bind Time 0.68s (± 0.82%) 0.68s (± 0.66%) 0.00s ( 0.00%) 0.67s 0.69s
Check Time 17.71s (± 0.54%) 16.01s (± 0.69%) 🟩-1.70s (- 9.61%) 15.85s 16.38s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 20.57s (± 0.48%) 18.86s (± 0.60%) 🟩-1.70s (- 8.28%) 18.69s 19.24s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-166-generic
Architecturex64
Available Memory16 GB
Available Memory1 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v8.9.0, x64)
  • node (v8.9.0, x86)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v8.9.0, x64)
  • Angular - node (v8.9.0, x86)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v8.9.0, x64)
  • Monaco - node (v8.9.0, x86)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v8.9.0, x64)
  • TFS - node (v8.9.0, x86)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v8.9.0, x64)
  • material-ui - node (v8.9.0, x86)
Benchmark Name Iterations
Current 36576 10
Baseline master 10

@ahejlsberg ahejlsberg removed the Experiment A fork with an experimental idea which might not make it into master label Mar 6, 2020
@ahejlsberg
Copy link
Member Author

@amcasey This improves material-ui memory usage by ~8% and performance by ~1%.

@ahejlsberg ahejlsberg added this to the TypeScript 3.9.0 milestone Mar 6, 2020
Copy link
Member

@amcasey amcasey left a comment

Choose a reason for hiding this comment

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

Some questions for my own edification.

src/compiler/checker.ts Show resolved Hide resolved
src/compiler/checker.ts Show resolved Hide resolved
src/compiler/checker.ts Show resolved Hide resolved
function createReplacementMapper(source: Type, target: Type, baseMapper: TypeMapper): TypeMapper {
return t => t === source ? target : baseMapper(t);
function addTypeMapping(mapper: TypeMapper | undefined, source: TypeParameter, target: Type) {
return mapper && mapper.kind === TypeMapKind.Simple && mapper.source2 === mapper.target2 ?
Copy link
Member

Choose a reason for hiding this comment

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

I'm getting mixed up. When you combine two maps, you look in the first map first and then, if you find something, do you stop looking or apply the second map to the first target? From the handling of composite maps in getMappedType it seems like it might be the latter, but this appears to do the former for unary maps?

Copy link
Member Author

Choose a reason for hiding this comment

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

The particular test here is to see if the second source/target pair in the simple mapper is unused (recall, when source and target are the same, we have a no-op). If so, we create a new simple mapper with both source/target pairs in use.

One added twist with composite mappers is that the first mapper may map to some type that the second mapper further maps. For example, the first mapper might map from T to U[] and the second mapper from U to string. This also explains why we directly call the getMappedType with the first mapper, but then call instantiateType with the second one.

Copy link
Member Author

Choose a reason for hiding this comment

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

I should add, in the addTypeMapping case, we actually don't care about the ability for the second mapping to affect the first mapping, which is why we can do the simple mapper optimization.

Copy link
Member

Choose a reason for hiding this comment

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

So maps are combined by composition, but we happen to know that this particular composition is equivalent to concatenation?

case TypeMapKind.Array:
return makeArrayTypeMapper(baseMapper.sources, map(baseMapper.targets, (t, i) => baseMapper.sources[i] === source ? target : t));
}
return makeFunctionTypeMapper(t => t === source ? target : getMappedType(t, baseMapper));
Copy link
Member

Choose a reason for hiding this comment

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

Depending on how badly I've mixed up composite maps (see my question above), this seems like it might be equivalent to a composite map with source-to-target on the left hand side?

Copy link
Member Author

@ahejlsberg ahejlsberg Mar 7, 2020

Choose a reason for hiding this comment

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

Not quite. We don't want the second mapping to be applied to the result of the first. We basically just want to replace one of the mappings in the second mapper, which we can do by putting a check in front of the second mapper.

Copy link
Member

Choose a reason for hiding this comment

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

How come this transformation (concatenation?) wasn't interesting enough to become a TypeMapKind?

@ahejlsberg
Copy link
Member Author

@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 8, 2020

Heya @ahejlsberg, I've started to run the perf test suite on this PR at ce9ddf3. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - master..36576

Metric master 36576 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 334,431k (± 0.02%) 332,896k (± 0.02%) -1,535k (- 0.46%) 332,702k 333,062k
Parse Time 1.63s (± 0.64%) 1.63s (± 0.51%) -0.01s (- 0.49%) 1.61s 1.64s
Bind Time 0.89s (± 1.18%) 0.89s (± 0.99%) -0.00s (- 0.34%) 0.87s 0.90s
Check Time 4.72s (± 0.27%) 4.74s (± 0.63%) +0.02s (+ 0.38%) 4.68s 4.80s
Emit Time 5.31s (± 1.08%) 5.29s (± 0.40%) -0.02s (- 0.36%) 5.25s 5.35s
Total Time 12.55s (± 0.53%) 12.54s (± 0.35%) -0.01s (- 0.11%) 12.44s 12.65s
Monaco - node (v10.16.3, x64)
Memory used 335,279k (± 0.02%) 334,414k (± 0.02%) -865k (- 0.26%) 334,299k 334,564k
Parse Time 1.26s (± 0.59%) 1.26s (± 0.72%) -0.00s (- 0.08%) 1.24s 1.28s
Bind Time 0.78s (± 0.38%) 0.78s (± 0.61%) -0.00s (- 0.13%) 0.77s 0.79s
Check Time 4.74s (± 0.44%) 4.73s (± 0.27%) -0.01s (- 0.27%) 4.70s 4.75s
Emit Time 2.91s (± 0.88%) 2.94s (± 0.97%) +0.02s (+ 0.72%) 2.87s 3.01s
Total Time 9.69s (± 0.44%) 9.69s (± 0.43%) +0.00s (+ 0.04%) 9.62s 9.79s
TFS - node (v10.16.3, x64)
Memory used 299,493k (± 0.02%) 298,317k (± 0.02%) -1,176k (- 0.39%) 298,233k 298,444k
Parse Time 0.95s (± 0.71%) 0.95s (± 0.62%) 0.00s ( 0.00%) 0.94s 0.96s
Bind Time 0.75s (± 0.69%) 0.74s (± 0.90%) -0.01s (- 0.80%) 0.72s 0.75s
Check Time 4.25s (± 0.32%) 4.25s (± 0.53%) -0.00s (- 0.05%) 4.21s 4.31s
Emit Time 3.06s (± 0.89%) 3.04s (± 0.79%) -0.02s (- 0.52%) 2.99s 3.09s
Total Time 9.01s (± 0.38%) 8.99s (± 0.44%) -0.02s (- 0.27%) 8.93s 9.11s
material-ui - node (v10.16.3, x64)
Memory used 488,968k (± 0.02%) 456,326k (± 0.02%) 🟩-32,642k (- 6.68%) 456,146k 456,493k
Parse Time 1.78s (± 0.51%) 1.78s (± 0.46%) -0.00s (- 0.22%) 1.76s 1.79s
Bind Time 0.68s (± 1.00%) 0.68s (± 0.98%) -0.00s (- 0.29%) 0.67s 0.70s
Check Time 13.68s (± 0.69%) 13.52s (± 0.84%) -0.15s (- 1.10%) 13.30s 13.79s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 16.14s (± 0.61%) 15.98s (± 0.74%) -0.16s (- 0.97%) 15.75s 16.27s
Angular - node (v12.1.0, x64)
Memory used 310,212k (± 0.02%) 308,632k (± 0.07%) -1,580k (- 0.51%) 307,764k 308,851k
Parse Time 1.58s (± 0.76%) 1.59s (± 0.98%) +0.01s (+ 0.63%) 1.55s 1.62s
Bind Time 0.87s (± 0.86%) 0.87s (± 0.76%) +0.00s (+ 0.35%) 0.85s 0.88s
Check Time 4.62s (± 0.43%) 4.62s (± 0.76%) +0.00s (+ 0.02%) 4.55s 4.74s
Emit Time 5.47s (± 1.08%) 5.49s (± 1.00%) +0.02s (+ 0.37%) 5.42s 5.69s
Total Time 12.53s (± 0.56%) 12.57s (± 0.46%) +0.04s (+ 0.32%) 12.47s 12.72s
Monaco - node (v12.1.0, x64)
Memory used 315,285k (± 0.02%) 314,330k (± 0.03%) -956k (- 0.30%) 314,207k 314,557k
Parse Time 1.22s (± 0.66%) 1.21s (± 0.70%) -0.01s (- 0.57%) 1.19s 1.23s
Bind Time 0.74s (± 0.64%) 0.74s (± 0.80%) +0.00s (+ 0.13%) 0.73s 0.76s
Check Time 4.55s (± 0.46%) 4.57s (± 0.61%) +0.02s (+ 0.42%) 4.52s 4.65s
Emit Time 2.95s (± 0.72%) 2.96s (± 1.09%) +0.02s (+ 0.54%) 2.92s 3.06s
Total Time 9.46s (± 0.29%) 9.49s (± 0.61%) +0.03s (+ 0.31%) 9.41s 9.68s
TFS - node (v12.1.0, x64)
Memory used 281,728k (± 0.03%) 280,643k (± 0.02%) -1,086k (- 0.39%) 280,502k 280,788k
Parse Time 0.94s (± 0.55%) 0.93s (± 1.01%) -0.01s (- 0.85%) 0.92s 0.96s
Bind Time 0.71s (± 1.07%) 0.71s (± 0.94%) +0.01s (+ 0.99%) 0.70s 0.73s
Check Time 4.19s (± 0.55%) 4.19s (± 0.77%) +0.00s (+ 0.07%) 4.13s 4.26s
Emit Time 3.07s (± 0.59%) 3.08s (± 0.99%) +0.01s (+ 0.33%) 3.02s 3.17s
Total Time 8.90s (± 0.43%) 8.92s (± 0.63%) +0.01s (+ 0.15%) 8.82s 9.08s
material-ui - node (v12.1.0, x64)
Memory used 466,490k (± 0.02%) 433,798k (± 0.01%) 🟩-32,692k (- 7.01%) 433,684k 433,864k
Parse Time 1.76s (± 0.65%) 1.76s (± 0.63%) 0.00s ( 0.00%) 1.74s 1.78s
Bind Time 0.63s (± 1.44%) 0.63s (± 0.80%) -0.00s (- 0.64%) 0.62s 0.64s
Check Time 12.14s (± 0.68%) 12.00s (± 0.59%) -0.13s (- 1.08%) 11.87s 12.18s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 14.53s (± 0.59%) 14.39s (± 0.48%) -0.13s (- 0.93%) 14.26s 14.56s
Angular - node (v8.9.0, x64)
Memory used 329,484k (± 0.01%) 327,948k (± 0.02%) -1,535k (- 0.47%) 327,802k 328,139k
Parse Time 2.12s (± 0.44%) 2.11s (± 0.50%) -0.01s (- 0.61%) 2.09s 2.13s
Bind Time 0.92s (± 0.84%) 0.92s (± 0.81%) -0.00s (- 0.22%) 0.90s 0.94s
Check Time 5.49s (± 0.59%) 5.51s (± 0.69%) +0.02s (+ 0.42%) 5.40s 5.56s
Emit Time 6.25s (± 0.99%) 6.22s (± 0.70%) -0.03s (- 0.45%) 6.14s 6.33s
Total Time 14.77s (± 0.48%) 14.75s (± 0.49%) -0.02s (- 0.14%) 14.62s 14.93s
Monaco - node (v8.9.0, x64)
Memory used 333,604k (± 0.01%) 332,659k (± 0.02%) -945k (- 0.28%) 332,544k 332,784k
Parse Time 1.54s (± 0.65%) 1.54s (± 0.61%) -0.00s (- 0.26%) 1.53s 1.57s
Bind Time 0.91s (± 1.15%) 0.91s (± 0.97%) +0.00s (+ 0.33%) 0.89s 0.93s
Check Time 5.42s (± 0.54%) 5.42s (± 0.72%) +0.01s (+ 0.17%) 5.36s 5.54s
Emit Time 3.52s (± 0.54%) 3.53s (± 0.52%) +0.01s (+ 0.34%) 3.49s 3.56s
Total Time 11.39s (± 0.36%) 11.41s (± 0.42%) +0.02s (+ 0.14%) 11.34s 11.58s
TFS - node (v8.9.0, x64)
Memory used 298,964k (± 0.02%) 297,751k (± 0.02%) -1,212k (- 0.41%) 297,663k 297,881k
Parse Time 1.25s (± 0.52%) 1.25s (± 0.38%) +0.00s (+ 0.08%) 1.24s 1.26s
Bind Time 0.75s (± 0.99%) 0.75s (± 0.74%) -0.00s (- 0.27%) 0.74s 0.76s
Check Time 4.82s (± 0.68%) 4.93s (± 1.67%) +0.11s (+ 2.34%) 4.78s 5.15s
Emit Time 3.36s (± 0.78%) 3.24s (± 2.71%) 🟩-0.12s (- 3.54%) 3.05s 3.41s
Total Time 10.18s (± 0.41%) 10.18s (± 0.45%) -0.01s (- 0.06%) 10.08s 10.29s
material-ui - node (v8.9.0, x64)
Memory used 494,797k (± 0.01%) 458,845k (± 0.01%) 🟩-35,953k (- 7.27%) 458,764k 458,937k
Parse Time 2.11s (± 0.72%) 2.11s (± 0.62%) -0.00s (- 0.05%) 2.08s 2.14s
Bind Time 0.80s (± 1.24%) 0.81s (± 1.09%) +0.01s (+ 1.37%) 0.79s 0.83s
Check Time 19.52s (± 0.79%) 17.68s (± 0.38%) 🟩-1.84s (- 9.43%) 17.50s 17.79s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 22.43s (± 0.70%) 20.60s (± 0.34%) 🟩-1.83s (- 8.18%) 20.42s 20.74s
Angular - node (v8.9.0, x86)
Memory used 189,007k (± 0.03%) 188,231k (± 0.02%) -776k (- 0.41%) 188,153k 188,369k
Parse Time 2.06s (± 0.53%) 2.06s (± 0.33%) -0.00s (- 0.24%) 2.04s 2.07s
Bind Time 1.07s (± 0.54%) 1.07s (± 0.71%) +0.00s (+ 0.09%) 1.06s 1.09s
Check Time 5.06s (± 0.69%) 5.04s (± 0.57%) -0.02s (- 0.38%) 4.97s 5.11s
Emit Time 6.16s (± 1.21%) 6.13s (± 0.53%) -0.03s (- 0.49%) 6.03s 6.18s
Total Time 14.36s (± 0.58%) 14.30s (± 0.37%) -0.06s (- 0.38%) 14.15s 14.41s
Monaco - node (v8.9.0, x86)
Memory used 189,285k (± 0.03%) 188,759k (± 0.01%) -525k (- 0.28%) 188,720k 188,797k
Parse Time 1.60s (± 0.98%) 1.59s (± 0.77%) -0.01s (- 0.44%) 1.57s 1.62s
Bind Time 0.77s (± 0.58%) 0.77s (± 0.84%) +0.00s (+ 0.00%) 0.75s 0.78s
Check Time 5.37s (± 1.98%) 5.42s (± 1.48%) +0.05s (+ 0.91%) 5.23s 5.55s
Emit Time 3.00s (± 4.05%) 2.95s (± 3.67%) -0.05s (- 1.77%) 2.78s 3.17s
Total Time 10.73s (± 0.48%) 10.72s (± 0.53%) -0.01s (- 0.08%) 10.59s 10.83s
TFS - node (v8.9.0, x86)
Memory used 170,449k (± 0.02%) 169,876k (± 0.02%) -574k (- 0.34%) 169,800k 169,935k
Parse Time 1.29s (± 0.87%) 1.29s (± 1.06%) +0.00s (+ 0.15%) 1.26s 1.33s
Bind Time 0.72s (± 0.97%) 0.71s (± 0.56%) -0.01s (- 1.11%) 0.70s 0.72s
Check Time 4.67s (± 0.86%) 4.60s (± 0.54%) -0.08s (- 1.65%) 4.54s 4.67s
Emit Time 2.98s (± 1.90%) 2.95s (± 0.99%) -0.03s (- 0.91%) 2.85s 3.00s
Total Time 9.65s (± 0.90%) 9.55s (± 0.46%) -0.10s (- 1.07%) 9.40s 9.62s
material-ui - node (v8.9.0, x86)
Memory used 277,263k (± 0.02%) 259,285k (± 0.02%) 🟩-17,978k (- 6.48%) 259,198k 259,349k
Parse Time 2.19s (± 0.57%) 2.18s (± 0.44%) -0.01s (- 0.46%) 2.16s 2.20s
Bind Time 0.69s (± 1.77%) 0.68s (± 0.54%) -0.01s (- 1.89%) 0.67s 0.68s
Check Time 17.77s (± 0.80%) 16.11s (± 0.63%) 🟩-1.66s (- 9.37%) 15.94s 16.32s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 20.64s (± 0.72%) 18.96s (± 0.56%) 🟩-1.68s (- 8.15%) 18.81s 19.19s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-166-generic
Architecturex64
Available Memory16 GB
Available Memory1 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v8.9.0, x64)
  • node (v8.9.0, x86)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v8.9.0, x64)
  • Angular - node (v8.9.0, x86)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v8.9.0, x64)
  • Monaco - node (v8.9.0, x86)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v8.9.0, x64)
  • TFS - node (v8.9.0, x86)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v8.9.0, x64)
  • material-ui - node (v8.9.0, x86)
Benchmark Name Iterations
Current 36576 10
Baseline master 10

@ahejlsberg
Copy link
Member Author

@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 8, 2020

Heya @ahejlsberg, I've started to run the perf test suite on this PR at 30e7a18. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - master..36576

Metric master 36576 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 334,431k (± 0.02%) 332,950k (± 0.03%) -1,481k (- 0.44%) 332,772k 333,170k
Parse Time 1.63s (± 0.64%) 1.63s (± 0.52%) -0.00s (- 0.24%) 1.61s 1.64s
Bind Time 0.89s (± 1.18%) 0.89s (± 0.79%) -0.00s (- 0.22%) 0.88s 0.91s
Check Time 4.72s (± 0.27%) 4.73s (± 0.55%) +0.01s (+ 0.25%) 4.68s 4.78s
Emit Time 5.31s (± 1.08%) 5.30s (± 0.54%) -0.01s (- 0.21%) 5.24s 5.36s
Total Time 12.55s (± 0.53%) 12.55s (± 0.47%) -0.00s (- 0.01%) 12.43s 12.68s
Monaco - node (v10.16.3, x64)
Memory used 335,279k (± 0.02%) 334,365k (± 0.02%) -914k (- 0.27%) 334,231k 334,543k
Parse Time 1.26s (± 0.59%) 1.26s (± 0.77%) +0.00s (+ 0.08%) 1.24s 1.28s
Bind Time 0.78s (± 0.38%) 0.78s (± 0.57%) -0.00s (- 0.00%) 0.77s 0.79s
Check Time 4.74s (± 0.44%) 4.72s (± 0.69%) -0.01s (- 0.27%) 4.65s 4.80s
Emit Time 2.91s (± 0.88%) 2.94s (± 1.05%) +0.03s (+ 0.89%) 2.88s 3.03s
Total Time 9.69s (± 0.44%) 9.70s (± 0.57%) +0.01s (+ 0.08%) 9.59s 9.80s
TFS - node (v10.16.3, x64)
Memory used 299,493k (± 0.02%) 298,342k (± 0.02%) -1,151k (- 0.38%) 298,225k 298,470k
Parse Time 0.95s (± 0.71%) 0.95s (± 0.62%) 0.00s ( 0.00%) 0.94s 0.97s
Bind Time 0.75s (± 0.69%) 0.74s (± 1.02%) -0.00s (- 0.53%) 0.73s 0.76s
Check Time 4.25s (± 0.32%) 4.26s (± 0.48%) +0.01s (+ 0.24%) 4.22s 4.30s
Emit Time 3.06s (± 0.89%) 3.06s (± 0.92%) -0.00s (- 0.10%) 2.98s 3.11s
Total Time 9.01s (± 0.38%) 9.02s (± 0.55%) +0.01s (+ 0.08%) 8.91s 9.14s
material-ui - node (v10.16.3, x64)
Memory used 488,968k (± 0.02%) 454,042k (± 0.01%) 🟩-34,926k (- 7.14%) 453,952k 454,139k
Parse Time 1.78s (± 0.51%) 1.78s (± 0.32%) -0.00s (- 0.06%) 1.77s 1.79s
Bind Time 0.68s (± 1.00%) 0.69s (± 0.65%) +0.00s (+ 0.44%) 0.68s 0.70s
Check Time 13.68s (± 0.69%) 13.50s (± 0.91%) -0.17s (- 1.26%) 13.29s 13.78s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 16.14s (± 0.61%) 15.97s (± 0.77%) -0.17s (- 1.03%) 15.76s 16.25s
Angular - node (v12.1.0, x64)
Memory used 310,212k (± 0.02%) 308,760k (± 0.04%) -1,452k (- 0.47%) 308,535k 308,985k
Parse Time 1.58s (± 0.76%) 1.59s (± 0.59%) +0.01s (+ 0.44%) 1.57s 1.61s
Bind Time 0.87s (± 0.86%) 0.87s (± 1.04%) +0.00s (+ 0.23%) 0.85s 0.89s
Check Time 4.62s (± 0.43%) 4.63s (± 0.44%) +0.01s (+ 0.24%) 4.58s 4.66s
Emit Time 5.47s (± 1.08%) 5.45s (± 0.79%) -0.02s (- 0.44%) 5.37s 5.55s
Total Time 12.53s (± 0.56%) 12.53s (± 0.54%) +0.00s (+ 0.00%) 12.40s 12.67s
Monaco - node (v12.1.0, x64)
Memory used 315,285k (± 0.02%) 314,335k (± 0.01%) -950k (- 0.30%) 314,251k 314,418k
Parse Time 1.22s (± 0.66%) 1.21s (± 0.91%) -0.01s (- 0.90%) 1.19s 1.23s
Bind Time 0.74s (± 0.64%) 0.74s (± 0.70%) -0.00s (- 0.27%) 0.73s 0.76s
Check Time 4.55s (± 0.46%) 4.55s (± 0.31%) -0.00s (- 0.07%) 4.52s 4.58s
Emit Time 2.95s (± 0.72%) 2.94s (± 0.53%) -0.01s (- 0.20%) 2.90s 2.97s
Total Time 9.46s (± 0.29%) 9.44s (± 0.33%) -0.02s (- 0.25%) 9.37s 9.50s
TFS - node (v12.1.0, x64)
Memory used 281,728k (± 0.03%) 280,640k (± 0.02%) -1,088k (- 0.39%) 280,515k 280,720k
Parse Time 0.94s (± 0.55%) 0.93s (± 0.73%) -0.01s (- 0.74%) 0.92s 0.95s
Bind Time 0.71s (± 1.07%) 0.70s (± 0.79%) -0.00s (- 0.57%) 0.69s 0.71s
Check Time 4.19s (± 0.55%) 4.19s (± 0.51%) +0.00s (+ 0.05%) 4.15s 4.23s
Emit Time 3.07s (± 0.59%) 3.10s (± 0.98%) +0.03s (+ 1.14%) 3.05s 3.18s
Total Time 8.90s (± 0.43%) 8.93s (± 0.52%) +0.03s (+ 0.31%) 8.84s 9.06s
material-ui - node (v12.1.0, x64)
Memory used 466,490k (± 0.02%) 431,438k (± 0.02%) 🟩-35,052k (- 7.51%) 431,307k 431,605k
Parse Time 1.76s (± 0.65%) 1.76s (± 0.63%) +0.00s (+ 0.06%) 1.75s 1.80s
Bind Time 0.63s (± 1.44%) 0.63s (± 1.70%) +0.00s (+ 0.32%) 0.62s 0.67s
Check Time 12.14s (± 0.68%) 12.08s (± 0.70%) -0.06s (- 0.46%) 11.84s 12.24s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 14.53s (± 0.59%) 14.47s (± 0.63%) -0.05s (- 0.37%) 14.22s 14.69s
Angular - node (v8.9.0, x64)
Memory used 329,484k (± 0.01%) 327,944k (± 0.02%) -1,539k (- 0.47%) 327,820k 328,141k
Parse Time 2.12s (± 0.44%) 2.11s (± 0.45%) -0.01s (- 0.28%) 2.09s 2.13s
Bind Time 0.92s (± 0.84%) 0.92s (± 0.67%) +0.00s (+ 0.22%) 0.91s 0.93s
Check Time 5.49s (± 0.59%) 5.53s (± 0.66%) +0.04s (+ 0.80%) 5.45s 5.60s
Emit Time 6.25s (± 0.99%) 6.17s (± 1.17%) -0.07s (- 1.18%) 5.99s 6.32s
Total Time 14.77s (± 0.48%) 14.74s (± 0.56%) -0.03s (- 0.22%) 14.48s 14.94s
Monaco - node (v8.9.0, x64)
Memory used 333,604k (± 0.01%) 332,602k (± 0.01%) -1,003k (- 0.30%) 332,525k 332,707k
Parse Time 1.54s (± 0.65%) 1.54s (± 0.68%) -0.00s (- 0.06%) 1.53s 1.58s
Bind Time 0.91s (± 1.15%) 0.92s (± 1.67%) +0.01s (+ 0.66%) 0.89s 0.97s
Check Time 5.42s (± 0.54%) 5.41s (± 0.40%) -0.01s (- 0.13%) 5.37s 5.45s
Emit Time 3.52s (± 0.54%) 3.52s (± 0.50%) +0.01s (+ 0.17%) 3.49s 3.56s
Total Time 11.39s (± 0.36%) 11.39s (± 0.33%) -0.00s (- 0.02%) 11.32s 11.48s
TFS - node (v8.9.0, x64)
Memory used 298,964k (± 0.02%) 297,700k (± 0.02%) -1,263k (- 0.42%) 297,631k 297,807k
Parse Time 1.25s (± 0.52%) 1.25s (± 0.38%) +0.00s (+ 0.08%) 1.24s 1.26s
Bind Time 0.75s (± 0.99%) 0.75s (± 0.74%) -0.00s (- 0.27%) 0.74s 0.76s
Check Time 4.82s (± 0.68%) 4.83s (± 0.63%) +0.01s (+ 0.17%) 4.76s 4.90s
Emit Time 3.36s (± 0.78%) 3.35s (± 0.72%) -0.01s (- 0.18%) 3.31s 3.40s
Total Time 10.18s (± 0.41%) 10.19s (± 0.46%) +0.00s (+ 0.03%) 10.07s 10.30s
material-ui - node (v8.9.0, x64)
Memory used 494,797k (± 0.01%) 456,403k (± 0.01%) 🟩-38,394k (- 7.76%) 456,277k 456,456k
Parse Time 2.11s (± 0.72%) 2.11s (± 0.39%) -0.00s (- 0.14%) 2.09s 2.13s
Bind Time 0.80s (± 1.24%) 0.81s (± 0.96%) +0.01s (+ 1.00%) 0.79s 0.83s
Check Time 19.52s (± 0.79%) 17.62s (± 1.02%) 🟩-1.90s (- 9.73%) 17.09s 17.87s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 22.43s (± 0.70%) 20.54s (± 0.88%) 🟩-1.90s (- 8.45%) 20.02s 20.80s
Angular - node (v8.9.0, x86)
Memory used 189,007k (± 0.03%) 188,222k (± 0.02%) -785k (- 0.42%) 188,133k 188,287k
Parse Time 2.06s (± 0.53%) 2.06s (± 0.58%) +0.00s (+ 0.19%) 2.04s 2.09s
Bind Time 1.07s (± 0.54%) 1.08s (± 0.69%) +0.00s (+ 0.37%) 1.06s 1.09s
Check Time 5.06s (± 0.69%) 5.04s (± 0.53%) -0.03s (- 0.53%) 4.95s 5.08s
Emit Time 6.16s (± 1.21%) 6.14s (± 0.60%) -0.02s (- 0.29%) 6.07s 6.22s
Total Time 14.36s (± 0.58%) 14.32s (± 0.27%) -0.04s (- 0.27%) 14.27s 14.44s
Monaco - node (v8.9.0, x86)
Memory used 189,285k (± 0.03%) 188,746k (± 0.02%) -539k (- 0.28%) 188,670k 188,829k
Parse Time 1.60s (± 0.98%) 1.59s (± 0.63%) -0.01s (- 0.56%) 1.57s 1.61s
Bind Time 0.77s (± 0.58%) 0.76s (± 0.58%) -0.01s (- 0.78%) 0.75s 0.77s
Check Time 5.37s (± 1.98%) 5.36s (± 1.73%) -0.01s (- 0.19%) 5.15s 5.49s
Emit Time 3.00s (± 4.05%) 2.98s (± 3.21%) -0.02s (- 0.60%) 2.84s 3.21s
Total Time 10.73s (± 0.48%) 10.69s (± 0.41%) -0.04s (- 0.37%) 10.61s 10.77s
TFS - node (v8.9.0, x86)
Memory used 170,449k (± 0.02%) 169,887k (± 0.03%) -563k (- 0.33%) 169,769k 170,011k
Parse Time 1.29s (± 0.87%) 1.29s (± 0.87%) -0.00s (- 0.00%) 1.27s 1.32s
Bind Time 0.72s (± 0.97%) 0.71s (± 0.52%) -0.00s (- 0.56%) 0.71s 0.72s
Check Time 4.67s (± 0.86%) 4.63s (± 0.62%) -0.04s (- 0.92%) 4.56s 4.68s
Emit Time 2.98s (± 1.90%) 3.06s (± 2.72%) +0.08s (+ 2.69%) 2.91s 3.26s
Total Time 9.65s (± 0.90%) 9.69s (± 1.00%) +0.04s (+ 0.37%) 9.48s 9.95s
material-ui - node (v8.9.0, x86)
Memory used 277,263k (± 0.02%) 258,108k (± 0.02%) 🟩-19,156k (- 6.91%) 258,026k 258,227k
Parse Time 2.19s (± 0.57%) 2.17s (± 0.46%) -0.01s (- 0.55%) 2.15s 2.20s
Bind Time 0.69s (± 1.77%) 0.68s (± 1.11%) -0.01s (- 0.73%) 0.67s 0.70s
Check Time 17.77s (± 0.80%) 16.06s (± 0.50%) 🟩-1.71s (- 9.63%) 15.83s 16.18s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 20.64s (± 0.72%) 18.92s (± 0.41%) 🟩-1.73s (- 8.37%) 18.68s 19.03s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-166-generic
Architecturex64
Available Memory16 GB
Available Memory1 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v8.9.0, x64)
  • node (v8.9.0, x86)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v8.9.0, x64)
  • Angular - node (v8.9.0, x86)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v8.9.0, x64)
  • Monaco - node (v8.9.0, x86)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v8.9.0, x64)
  • TFS - node (v8.9.0, x86)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v8.9.0, x64)
  • material-ui - node (v8.9.0, x86)
Benchmark Name Iterations
Current 36576 10
Baseline master 10

Copy link
Member

@weswigham weswigham left a comment

Choose a reason for hiding this comment

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

Does it make sense to recognize the identityMapper singleton in prepend/append/merge and short-circuit the construction of a composite mapper, if it's found?

}

function makeBinaryTypeMapper(source1: Type, target1: Type, source2: Type, target2: Type) {
return (t: Type) => t === source1 ? target1 : t === source2 ? target2 : t;
function getMappedType(type: Type, mapper: TypeMapper): Type {
Copy link
Member

Choose a reason for hiding this comment

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

I kinda-sorta wanna preemptively make this a loop rather than a recursive function to better optimize the recursive cases, but... it's not strictly required.

Copy link
Member Author

Choose a reason for hiding this comment

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

I looked at that, but just makes the code more complex for no appreciable gain.

@ahejlsberg
Copy link
Member Author

@weswigham Easier to just get rid of the identityMapper! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants