Skip to content

Conversation

@ahejlsberg
Copy link
Member

@ahejlsberg ahejlsberg commented Dec 6, 2020

With this PR we properly preserve substitution types in the check type position of conditional types. Previously we'd erase substitution types, thus losing constraints implied by containing conditional types. In #32093 this was fixed by attempting to simplify types during inference, but that can lead to infinite recursion as seen in #41756. By fixing the root issue (the erasure of substitution types) we can do away with #32093 and the infinite recursion.

BTW, the reasons we erased substitution types appear to be historical. Properly preserving them appears to have no ill effects.

Fixes #41756.

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Dec 6, 2020
@ahejlsberg
Copy link
Member Author

@typescript-bot test this
@typescript-bot user test this
@typescript-bot run dt

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 7, 2020

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 7, 2020

Heya @ahejlsberg, I've started to run the parallelized community code test suite on this PR at 542a8a2. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 7, 2020

Heya @ahejlsberg, I've started to run the parallelized Definitely Typed test suite on this PR at 542a8a2. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

The user suite test run you requested has finished and failed. I've opened a PR with the baseline diff from master.

@DanielRosenwasser
Copy link
Member

@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 7, 2020

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

Update: The results are in!

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.

Good to know we've improved our handling of substitution types elsewhere enough to not need all these special cases anymore. So long as the extended test suite and DT comes back OK (I think they're good?), this seems good.

@ahejlsberg
Copy link
Member Author

DT is clean. Best I can tell so are RWC and the extended test suite, but there's a mess of unrelated issues in both suites. Looks like the perf test machine is not responding.

@weswigham
Copy link
Member

Ah yeah, power was turned off in the office on Friday. I was planning on stopping by in a bit to turn my own workstation back on - I'll check the perf machine while I'm there.

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - master..41841

Metric master 41841 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 344,480k (± 0.03%) 344,475k (± 0.02%) -5k (- 0.00%) 344,357k 344,659k
Parse Time 1.99s (± 1.82%) 1.99s (± 1.63%) +0.00s (+ 0.20%) 1.96s 2.12s
Bind Time 0.82s (± 0.72%) 0.83s (± 0.85%) +0.00s (+ 0.61%) 0.82s 0.85s
Check Time 4.94s (± 0.45%) 4.96s (± 0.47%) +0.01s (+ 0.30%) 4.92s 5.02s
Emit Time 5.34s (± 0.76%) 5.35s (± 0.71%) +0.01s (+ 0.26%) 5.27s 5.47s
Total Time 13.10s (± 0.48%) 13.13s (± 0.60%) +0.04s (+ 0.29%) 13.00s 13.40s
Compiler-Unions - node (v10.16.3, x64)
Memory used 205,278k (± 0.03%) 205,268k (± 0.04%) -11k (- 0.01%) 205,124k 205,432k
Parse Time 0.79s (± 1.36%) 0.79s (± 1.19%) -0.00s (- 0.13%) 0.77s 0.82s
Bind Time 0.50s (± 1.04%) 0.50s (± 1.40%) -0.00s (- 0.00%) 0.48s 0.51s
Check Time 11.97s (± 1.03%) 12.02s (± 1.03%) +0.05s (+ 0.41%) 11.79s 12.26s
Emit Time 2.33s (± 1.04%) 2.37s (± 2.06%) +0.04s (+ 1.59%) 2.30s 2.50s
Total Time 15.60s (± 0.90%) 15.69s (± 0.82%) +0.09s (+ 0.57%) 15.43s 16.03s
Monaco - node (v10.16.3, x64)
Memory used 354,924k (± 0.02%) 354,949k (± 0.03%) +25k (+ 0.01%) 354,757k 355,196k
Parse Time 1.61s (± 1.66%) 1.61s (± 1.85%) -0.01s (- 0.31%) 1.54s 1.71s
Bind Time 0.72s (± 0.50%) 0.73s (± 0.41%) +0.01s (+ 1.10%) 0.73s 0.74s
Check Time 5.12s (± 0.51%) 5.12s (± 0.39%) +0.00s (+ 0.04%) 5.08s 5.17s
Emit Time 2.82s (± 0.67%) 2.80s (± 0.75%) -0.01s (- 0.43%) 2.77s 2.85s
Total Time 10.28s (± 0.30%) 10.27s (± 0.62%) -0.01s (- 0.06%) 10.15s 10.44s
TFS - node (v10.16.3, x64)
Memory used 307,916k (± 0.02%) 307,930k (± 0.02%) +13k (+ 0.00%) 307,751k 308,040k
Parse Time 1.25s (± 1.37%) 1.24s (± 1.10%) -0.01s (- 0.80%) 1.22s 1.29s
Bind Time 0.68s (± 1.79%) 0.68s (± 0.87%) +0.01s (+ 1.33%) 0.67s 0.70s
Check Time 4.57s (± 0.44%) 4.56s (± 0.54%) -0.01s (- 0.20%) 4.51s 4.61s
Emit Time 2.97s (± 0.95%) 2.92s (± 1.30%) -0.04s (- 1.45%) 2.84s 3.02s
Total Time 9.47s (± 0.55%) 9.41s (± 0.52%) -0.06s (- 0.61%) 9.29s 9.51s
material-ui - node (v10.16.3, x64)
Memory used 489,379k (± 0.01%) 489,366k (± 0.01%) -13k (- 0.00%) 489,298k 489,471k
Parse Time 2.08s (± 2.19%) 2.08s (± 1.99%) +0.01s (+ 0.24%) 2.06s 2.25s
Bind Time 0.66s (± 0.91%) 0.65s (± 0.56%) -0.00s (- 0.15%) 0.65s 0.66s
Check Time 13.67s (± 0.54%) 13.68s (± 0.68%) +0.01s (+ 0.07%) 13.42s 13.84s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 16.40s (± 0.61%) 16.42s (± 0.60%) +0.01s (+ 0.09%) 16.13s 16.57s
Angular - node (v12.1.0, x64)
Memory used 322,356k (± 0.02%) 322,323k (± 0.03%) -33k (- 0.01%) 322,113k 322,469k
Parse Time 1.95s (± 0.45%) 1.97s (± 0.41%) +0.02s (+ 1.02%) 1.95s 1.99s
Bind Time 0.81s (± 0.71%) 0.82s (± 1.07%) +0.01s (+ 0.86%) 0.80s 0.84s
Check Time 4.89s (± 1.45%) 4.89s (± 0.25%) +0.00s (+ 0.08%) 4.86s 4.91s
Emit Time 5.46s (± 0.36%) 5.50s (± 0.56%) +0.04s (+ 0.81%) 5.41s 5.56s
Total Time 13.11s (± 0.52%) 13.19s (± 0.21%) +0.08s (+ 0.62%) 13.14s 13.24s
Compiler-Unions - node (v12.1.0, x64)
Memory used 191,390k (± 0.04%) 191,396k (± 0.07%) +7k (+ 0.00%) 190,950k 191,655k
Parse Time 0.77s (± 1.12%) 0.78s (± 1.03%) +0.01s (+ 0.78%) 0.76s 0.80s
Bind Time 0.49s (± 0.60%) 0.50s (± 0.80%) +0.01s (+ 1.42%) 0.49s 0.51s
Check Time 10.61s (± 0.53%) 10.88s (± 1.85%) +0.28s (+ 2.60%) 10.64s 11.62s
Emit Time 2.37s (± 0.84%) 2.38s (± 2.07%) +0.01s (+ 0.46%) 2.30s 2.55s
Total Time 14.24s (± 0.40%) 14.54s (± 1.50%) +0.30s (+ 2.09%) 14.20s 15.28s
Monaco - node (v12.1.0, x64)
Memory used 336,996k (± 0.01%) 337,042k (± 0.02%) +47k (+ 0.01%) 336,855k 337,181k
Parse Time 1.58s (± 0.41%) 1.58s (± 0.56%) +0.01s (+ 0.32%) 1.56s 1.60s
Bind Time 0.71s (± 0.85%) 0.71s (± 0.73%) +0.00s (+ 0.57%) 0.70s 0.72s
Check Time 4.89s (± 0.53%) 4.94s (± 0.55%) +0.04s (+ 0.90%) 4.85s 5.00s
Emit Time 2.87s (± 0.55%) 2.88s (± 0.74%) +0.01s (+ 0.45%) 2.84s 2.94s
Total Time 10.05s (± 0.29%) 10.11s (± 0.47%) +0.06s (+ 0.64%) 9.98s 10.23s
TFS - node (v12.1.0, x64)
Memory used 292,146k (± 0.01%) 292,189k (± 0.02%) +44k (+ 0.01%) 292,081k 292,284k
Parse Time 1.25s (± 0.77%) 1.26s (± 0.47%) +0.01s (+ 0.88%) 1.25s 1.27s
Bind Time 0.66s (± 1.83%) 0.66s (± 1.02%) +0.00s (+ 0.00%) 0.65s 0.68s
Check Time 4.48s (± 0.48%) 4.51s (± 0.31%) +0.02s (+ 0.56%) 4.46s 4.53s
Emit Time 2.96s (± 1.23%) 2.97s (± 1.20%) +0.01s (+ 0.27%) 2.92s 3.10s
Total Time 9.35s (± 0.24%) 9.40s (± 0.44%) +0.05s (+ 0.53%) 9.32s 9.55s
material-ui - node (v12.1.0, x64)
Memory used 467,469k (± 0.01%) 467,431k (± 0.01%) -38k (- 0.01%) 467,346k 467,532k
Parse Time 2.08s (± 0.46%) 2.09s (± 0.58%) +0.01s (+ 0.53%) 2.05s 2.11s
Bind Time 0.64s (± 0.81%) 0.65s (± 1.12%) +0.01s (+ 1.72%) 0.64s 0.67s
Check Time 12.05s (± 0.61%) 12.12s (± 0.70%) +0.07s (+ 0.61%) 11.94s 12.29s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 14.77s (± 0.50%) 14.86s (± 0.62%) +0.09s (+ 0.64%) 14.69s 15.03s
Angular - node (v8.9.0, x64)
Memory used 347,094k (± 0.01%) 347,040k (± 0.02%) -54k (- 0.02%) 346,786k 347,173k
Parse Time 2.52s (± 0.49%) 2.50s (± 0.43%) -0.02s (- 0.68%) 2.48s 2.53s
Bind Time 0.86s (± 0.81%) 0.86s (± 0.58%) +0.00s (+ 0.46%) 0.86s 0.88s
Check Time 5.59s (± 0.64%) 5.58s (± 0.72%) -0.00s (- 0.09%) 5.51s 5.67s
Emit Time 6.29s (± 0.81%) 6.33s (± 1.13%) +0.04s (+ 0.59%) 6.15s 6.46s
Total Time 15.26s (± 0.29%) 15.28s (± 0.58%) +0.01s (+ 0.09%) 15.13s 15.48s
Compiler-Unions - node (v8.9.0, x64)
Memory used 212,938k (± 0.03%) 212,931k (± 0.03%) -8k (- 0.00%) 212,801k 213,093k
Parse Time 0.95s (± 0.71%) 0.95s (± 0.62%) 0.00s ( 0.00%) 0.94s 0.97s
Bind Time 0.57s (± 1.17%) 0.57s (± 0.58%) -0.00s (- 0.52%) 0.56s 0.58s
Check Time 14.53s (± 0.75%) 14.67s (± 1.00%) +0.15s (+ 1.00%) 14.32s 14.97s
Emit Time 2.75s (± 1.93%) 2.76s (± 1.10%) +0.01s (+ 0.51%) 2.68s 2.80s
Total Time 18.80s (± 0.76%) 18.96s (± 0.91%) +0.15s (+ 0.82%) 18.61s 19.29s
Monaco - node (v8.9.0, x64)
Memory used 358,691k (± 0.01%) 358,714k (± 0.02%) +24k (+ 0.01%) 358,558k 358,853k
Parse Time 1.93s (± 0.52%) 1.93s (± 0.32%) +0.00s (+ 0.21%) 1.91s 1.94s
Bind Time 0.91s (± 0.80%) 0.91s (± 0.52%) +0.00s (+ 0.22%) 0.90s 0.92s
Check Time 5.64s (± 0.37%) 5.65s (± 0.37%) +0.01s (+ 0.23%) 5.59s 5.69s
Emit Time 3.41s (± 0.54%) 3.41s (± 0.57%) -0.01s (- 0.23%) 3.35s 3.46s
Total Time 11.88s (± 0.25%) 11.90s (± 0.36%) +0.01s (+ 0.10%) 11.77s 11.98s
TFS - node (v8.9.0, x64)
Memory used 310,487k (± 0.02%) 310,440k (± 0.01%) -47k (- 0.02%) 310,348k 310,540k
Parse Time 1.57s (± 0.48%) 1.56s (± 0.47%) -0.01s (- 0.57%) 1.54s 1.57s
Bind Time 0.68s (± 0.50%) 0.69s (± 0.72%) +0.00s (+ 0.44%) 0.68s 0.70s
Check Time 5.30s (± 0.40%) 5.35s (± 0.52%) +0.04s (+ 0.85%) 5.31s 5.41s
Emit Time 2.95s (± 0.71%) 2.97s (± 0.47%) +0.02s (+ 0.78%) 2.94s 3.00s
Total Time 10.50s (± 0.25%) 10.56s (± 0.37%) +0.07s (+ 0.65%) 10.50s 10.67s
material-ui - node (v8.9.0, x64)
Memory used 496,409k (± 0.02%) 496,426k (± 0.01%) +17k (+ 0.00%) 496,335k 496,527k
Parse Time 2.49s (± 0.46%) 2.49s (± 0.33%) +0.00s (+ 0.00%) 2.47s 2.50s
Bind Time 0.80s (± 1.23%) 0.80s (± 1.02%) -0.00s (- 0.25%) 0.78s 0.81s
Check Time 18.12s (± 0.46%) 18.18s (± 0.53%) +0.06s (+ 0.33%) 17.96s 18.39s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 21.41s (± 0.37%) 21.47s (± 0.45%) +0.05s (+ 0.26%) 21.27s 21.69s
Angular - node (v8.9.0, x86)
Memory used 199,037k (± 0.02%) 199,037k (± 0.03%) +0k (+ 0.00%) 198,934k 199,120k
Parse Time 2.43s (± 0.72%) 2.44s (± 0.93%) +0.01s (+ 0.58%) 2.40s 2.50s
Bind Time 1.02s (± 1.34%) 1.02s (± 1.00%) +0.00s (+ 0.29%) 1.00s 1.05s
Check Time 5.05s (± 0.76%) 5.05s (± 0.40%) 0.00s ( 0.00%) 5.01s 5.08s
Emit Time 6.08s (± 0.64%) 6.14s (± 1.06%) +0.05s (+ 0.89%) 6.00s 6.33s
Total Time 14.57s (± 0.51%) 14.65s (± 0.38%) +0.07s (+ 0.49%) 14.52s 14.80s
Compiler-Unions - node (v8.9.0, x86)
Memory used 127,974k (± 0.04%) 127,980k (± 0.04%) +6k (+ 0.01%) 127,898k 128,094k
Parse Time 0.96s (± 0.64%) 0.96s (± 0.54%) -0.00s (- 0.00%) 0.95s 0.97s
Bind Time 0.49s (± 0.69%) 0.50s (± 1.15%) +0.01s (+ 1.42%) 0.49s 0.51s
Check Time 13.63s (± 0.39%) 13.73s (± 0.60%) +0.10s (+ 0.72%) 13.52s 13.95s
Emit Time 2.60s (± 0.95%) 2.62s (± 0.68%) +0.02s (+ 0.65%) 2.56s 2.66s
Total Time 17.68s (± 0.40%) 17.80s (± 0.49%) +0.12s (+ 0.70%) 17.59s 18.03s
Monaco - node (v8.9.0, x86)
Memory used 203,186k (± 0.02%) 203,145k (± 0.02%) -41k (- 0.02%) 203,094k 203,224k
Parse Time 1.96s (± 0.42%) 1.97s (± 0.76%) +0.01s (+ 0.31%) 1.94s 2.00s
Bind Time 0.72s (± 0.83%) 0.72s (± 0.90%) +0.00s (+ 0.28%) 0.71s 0.73s
Check Time 5.75s (± 0.60%) 5.75s (± 0.58%) 0.00s ( 0.00%) 5.68s 5.85s
Emit Time 2.74s (± 0.83%) 2.75s (± 1.11%) +0.02s (+ 0.62%) 2.70s 2.82s
Total Time 11.17s (± 0.36%) 11.19s (± 0.36%) +0.03s (+ 0.22%) 11.13s 11.30s
TFS - node (v8.9.0, x86)
Memory used 177,587k (± 0.03%) 177,605k (± 0.02%) +19k (+ 0.01%) 177,516k 177,665k
Parse Time 1.60s (± 0.69%) 1.62s (± 1.45%) +0.02s (+ 1.50%) 1.59s 1.68s
Bind Time 0.65s (± 1.25%) 0.65s (± 0.61%) +0.00s (+ 0.15%) 0.64s 0.66s
Check Time 4.86s (± 0.37%) 4.85s (± 0.62%) -0.01s (- 0.14%) 4.81s 4.94s
Emit Time 2.86s (± 1.00%) 2.81s (± 1.05%) -0.05s (- 1.82%) 2.74s 2.87s
Total Time 9.96s (± 0.53%) 9.93s (± 0.35%) -0.03s (- 0.34%) 9.83s 10.02s
material-ui - node (v8.9.0, x86)
Memory used 279,520k (± 0.01%) 279,489k (± 0.01%) -31k (- 0.01%) 279,353k 279,554k
Parse Time 2.55s (± 1.04%) 2.54s (± 0.75%) -0.01s (- 0.31%) 2.49s 2.59s
Bind Time 0.74s (± 5.87%) 0.79s (± 6.55%) +0.05s (+ 7.20%) 0.69s 0.88s
Check Time 16.44s (± 0.55%) 16.38s (± 0.95%) -0.06s (- 0.36%) 16.04s 16.75s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 19.73s (± 0.41%) 19.72s (± 0.84%) -0.02s (- 0.09%) 19.39s 20.19s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-197-generic
Architecturex64
Available Memory16 GB
Available Memory13 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)
  • Compiler-Unions - node (v10.16.3, x64)
  • Compiler-Unions - node (v12.1.0, x64)
  • Compiler-Unions - node (v8.9.0, x64)
  • Compiler-Unions - 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 41841 10
Baseline master 10

@DanielRosenwasser
Copy link
Member

Looks like there is a bit of slow-down - I'm not sure why in the compiler-with-unions test case though. Would substitution types appear much in that version of the codebase?

@weswigham
Copy link
Member

weswigham commented Dec 7, 2020

We only really use conditionals (which are what create substitutions) in two ways in our own codebase. The ! operator, and in our comment pragma types.

@ahejlsberg
Copy link
Member Author

There is an almost 10% difference between the best and worst check times in compiler-with-unions. I'm going to run the perf tests again to see if that persists.

@ahejlsberg
Copy link
Member Author

@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 8, 2020

Heya @ahejlsberg, I've started to run the perf test suite on this PR at 542a8a2. 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..41841

Metric master 41841 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 344,242k (± 0.03%) 344,251k (± 0.02%) +9k (+ 0.00%) 344,116k 344,388k
Parse Time 1.99s (± 0.61%) 2.00s (± 0.56%) +0.01s (+ 0.76%) 1.97s 2.02s
Bind Time 0.83s (± 0.87%) 0.84s (± 0.74%) +0.01s (+ 0.84%) 0.83s 0.85s
Check Time 4.96s (± 0.50%) 4.97s (± 0.54%) +0.01s (+ 0.26%) 4.91s 5.03s
Emit Time 5.35s (± 0.77%) 5.42s (± 0.89%) +0.07s (+ 1.21%) 5.36s 5.60s
Total Time 13.13s (± 0.50%) 13.23s (± 0.42%) +0.10s (+ 0.78%) 13.10s 13.37s
Compiler-Unions - node (v10.16.3, x64)
Memory used 205,343k (± 0.02%) 205,291k (± 0.06%) -52k (- 0.03%) 204,849k 205,552k
Parse Time 0.79s (± 0.96%) 0.80s (± 0.94%) +0.00s (+ 0.25%) 0.78s 0.81s
Bind Time 0.50s (± 1.45%) 0.50s (± 1.04%) -0.00s (- 0.20%) 0.49s 0.51s
Check Time 12.05s (± 0.96%) 12.06s (± 0.65%) +0.01s (+ 0.07%) 11.82s 12.23s
Emit Time 2.35s (± 1.25%) 2.36s (± 1.05%) +0.01s (+ 0.60%) 2.32s 2.42s
Total Time 15.69s (± 0.85%) 15.72s (± 0.56%) +0.03s (+ 0.17%) 15.48s 15.94s
Monaco - node (v10.16.3, x64)
Memory used 354,902k (± 0.01%) 354,895k (± 0.02%) -7k (- 0.00%) 354,783k 354,992k
Parse Time 1.61s (± 0.47%) 1.62s (± 0.58%) +0.01s (+ 0.37%) 1.60s 1.64s
Bind Time 0.73s (± 0.76%) 0.73s (± 0.31%) +0.00s (+ 0.14%) 0.72s 0.73s
Check Time 5.13s (± 0.61%) 5.15s (± 0.46%) +0.03s (+ 0.51%) 5.11s 5.22s
Emit Time 2.83s (± 0.85%) 2.83s (± 0.57%) +0.00s (+ 0.07%) 2.80s 2.87s
Total Time 10.29s (± 0.47%) 10.33s (± 0.31%) +0.04s (+ 0.38%) 10.27s 10.42s
TFS - node (v10.16.3, x64)
Memory used 307,973k (± 0.02%) 307,930k (± 0.02%) -43k (- 0.01%) 307,822k 308,057k
Parse Time 1.24s (± 0.40%) 1.25s (± 1.29%) +0.01s (+ 1.13%) 1.22s 1.30s
Bind Time 0.68s (± 0.44%) 0.68s (± 1.30%) -0.00s (- 0.73%) 0.66s 0.69s
Check Time 4.60s (± 0.40%) 4.59s (± 0.50%) -0.01s (- 0.20%) 4.53s 4.63s
Emit Time 2.96s (± 0.94%) 2.95s (± 1.07%) -0.00s (- 0.10%) 2.86s 3.00s
Total Time 9.47s (± 0.40%) 9.47s (± 0.56%) -0.00s (- 0.00%) 9.35s 9.57s
material-ui - node (v10.16.3, x64)
Memory used 489,375k (± 0.02%) 489,381k (± 0.01%) +7k (+ 0.00%) 489,280k 489,550k
Parse Time 2.08s (± 0.59%) 2.07s (± 0.50%) -0.01s (- 0.62%) 2.05s 2.09s
Bind Time 0.66s (± 1.41%) 0.66s (± 0.79%) +0.00s (+ 0.15%) 0.65s 0.67s
Check Time 13.69s (± 0.58%) 13.59s (± 0.47%) -0.11s (- 0.77%) 13.46s 13.71s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 16.43s (± 0.53%) 16.31s (± 0.42%) -0.12s (- 0.71%) 16.18s 16.45s
Angular - node (v12.1.0, x64)
Memory used 321,988k (± 0.10%) 322,125k (± 0.03%) +137k (+ 0.04%) 321,949k 322,373k
Parse Time 1.95s (± 0.54%) 1.97s (± 0.53%) +0.02s (+ 0.77%) 1.95s 1.99s
Bind Time 0.81s (± 1.02%) 0.82s (± 0.86%) +0.01s (+ 0.61%) 0.80s 0.84s
Check Time 4.90s (± 0.95%) 4.89s (± 0.41%) -0.01s (- 0.24%) 4.84s 4.93s
Emit Time 5.49s (± 1.00%) 5.55s (± 1.30%) +0.06s (+ 1.09%) 5.46s 5.75s
Total Time 13.16s (± 0.68%) 13.23s (± 0.63%) +0.07s (+ 0.53%) 13.07s 13.47s
Compiler-Unions - node (v12.1.0, x64)
Memory used 191,522k (± 0.04%) 191,422k (± 0.08%) -99k (- 0.05%) 190,916k 191,586k
Parse Time 0.78s (± 0.74%) 0.78s (± 0.90%) +0.00s (+ 0.13%) 0.77s 0.80s
Bind Time 0.50s (± 1.04%) 0.50s (± 0.80%) 0.00s ( 0.00%) 0.49s 0.51s
Check Time 10.77s (± 0.82%) 10.80s (± 0.62%) +0.03s (+ 0.30%) 10.70s 11.01s
Emit Time 2.41s (± 1.11%) 2.40s (± 1.44%) -0.01s (- 0.58%) 2.31s 2.48s
Total Time 14.46s (± 0.68%) 14.48s (± 0.56%) +0.01s (+ 0.10%) 14.36s 14.73s
Monaco - node (v12.1.0, x64)
Memory used 336,983k (± 0.02%) 337,005k (± 0.02%) +22k (+ 0.01%) 336,879k 337,119k
Parse Time 1.59s (± 0.58%) 1.59s (± 0.79%) +0.00s (+ 0.19%) 1.56s 1.62s
Bind Time 0.71s (± 0.52%) 0.71s (± 0.42%) +0.00s (+ 0.28%) 0.70s 0.71s
Check Time 4.91s (± 0.81%) 4.93s (± 0.56%) +0.03s (+ 0.51%) 4.89s 5.00s
Emit Time 2.88s (± 0.35%) 2.88s (± 0.50%) -0.00s (- 0.03%) 2.85s 2.92s
Total Time 10.08s (± 0.46%) 10.11s (± 0.35%) +0.03s (+ 0.26%) 10.03s 10.19s
TFS - node (v12.1.0, x64)
Memory used 292,159k (± 0.02%) 292,188k (± 0.03%) +29k (+ 0.01%) 291,954k 292,387k
Parse Time 1.27s (± 0.70%) 1.27s (± 0.54%) -0.00s (- 0.08%) 1.25s 1.28s
Bind Time 0.66s (± 0.68%) 0.66s (± 0.87%) +0.00s (+ 0.30%) 0.65s 0.68s
Check Time 4.52s (± 0.79%) 4.53s (± 0.39%) +0.01s (+ 0.29%) 4.49s 4.57s
Emit Time 2.99s (± 0.82%) 2.97s (± 0.70%) -0.02s (- 0.64%) 2.93s 3.01s
Total Time 9.43s (± 0.44%) 9.43s (± 0.23%) -0.00s (- 0.02%) 9.36s 9.46s
material-ui - node (v12.1.0, x64)
Memory used 467,034k (± 0.08%) 467,295k (± 0.06%) +261k (+ 0.06%) 466,260k 467,496k
Parse Time 2.09s (± 0.45%) 2.09s (± 0.51%) +0.00s (+ 0.10%) 2.07s 2.11s
Bind Time 0.65s (± 0.89%) 0.65s (± 0.46%) +0.00s (+ 0.31%) 0.65s 0.66s
Check Time 12.33s (± 0.92%) 12.18s (± 0.95%) -0.14s (- 1.17%) 11.98s 12.54s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.07s (± 0.80%) 14.92s (± 0.79%) -0.14s (- 0.96%) 14.71s 15.27s
Angular - node (v8.9.0, x64)
Memory used 346,880k (± 0.02%) 346,842k (± 0.01%) -38k (- 0.01%) 346,740k 346,912k
Parse Time 2.51s (± 0.23%) 2.52s (± 0.81%) +0.01s (+ 0.48%) 2.49s 2.59s
Bind Time 0.87s (± 0.54%) 0.87s (± 0.56%) +0.00s (+ 0.46%) 0.87s 0.89s
Check Time 5.60s (± 0.22%) 5.61s (± 0.65%) +0.02s (+ 0.30%) 5.51s 5.69s
Emit Time 6.37s (± 1.73%) 6.34s (± 1.03%) -0.03s (- 0.44%) 6.21s 6.53s
Total Time 15.34s (± 0.66%) 15.35s (± 0.51%) +0.01s (+ 0.03%) 15.21s 15.51s
Compiler-Unions - node (v8.9.0, x64)
Memory used 212,941k (± 0.02%) 212,978k (± 0.02%) +37k (+ 0.02%) 212,893k 213,049k
Parse Time 0.96s (± 0.79%) 0.96s (± 0.76%) +0.00s (+ 0.21%) 0.94s 0.97s
Bind Time 0.58s (± 0.86%) 0.58s (± 1.21%) +0.00s (+ 0.52%) 0.57s 0.60s
Check Time 14.65s (± 1.19%) 14.58s (± 0.90%) -0.07s (- 0.51%) 14.29s 14.90s
Emit Time 2.76s (± 2.27%) 2.72s (± 2.26%) -0.04s (- 1.49%) 2.60s 2.84s
Total Time 18.94s (± 1.12%) 18.83s (± 0.92%) -0.11s (- 0.59%) 18.58s 19.22s
Monaco - node (v8.9.0, x64)
Memory used 358,701k (± 0.01%) 358,719k (± 0.01%) +18k (+ 0.00%) 358,546k 358,800k
Parse Time 1.93s (± 0.42%) 1.94s (± 0.60%) +0.01s (+ 0.62%) 1.92s 1.98s
Bind Time 0.91s (± 0.66%) 0.91s (± 0.61%) +0.01s (+ 0.77%) 0.90s 0.93s
Check Time 5.67s (± 0.61%) 5.68s (± 0.54%) +0.01s (+ 0.23%) 5.60s 5.77s
Emit Time 3.40s (± 0.46%) 3.42s (± 0.40%) +0.01s (+ 0.41%) 3.38s 3.45s
Total Time 11.90s (± 0.42%) 11.95s (± 0.36%) +0.05s (+ 0.38%) 11.82s 12.04s
TFS - node (v8.9.0, x64)
Memory used 310,509k (± 0.01%) 310,500k (± 0.01%) -9k (- 0.00%) 310,389k 310,550k
Parse Time 1.57s (± 0.30%) 1.57s (± 0.33%) +0.00s (+ 0.06%) 1.56s 1.58s
Bind Time 0.68s (± 0.53%) 0.69s (± 0.69%) +0.00s (+ 0.44%) 0.68s 0.70s
Check Time 5.34s (± 0.61%) 5.36s (± 0.64%) +0.02s (+ 0.36%) 5.30s 5.44s
Emit Time 2.97s (± 0.49%) 2.97s (± 0.44%) -0.00s (- 0.17%) 2.95s 3.00s
Total Time 10.57s (± 0.46%) 10.59s (± 0.46%) +0.01s (+ 0.12%) 10.51s 10.70s
material-ui - node (v8.9.0, x64)
Memory used 496,437k (± 0.01%) 496,453k (± 0.01%) +17k (+ 0.00%) 496,283k 496,591k
Parse Time 2.51s (± 0.48%) 2.52s (± 0.55%) +0.01s (+ 0.24%) 2.49s 2.55s
Bind Time 0.82s (± 1.54%) 0.82s (± 1.37%) -0.00s (- 0.49%) 0.79s 0.84s
Check Time 18.17s (± 0.54%) 18.17s (± 0.71%) -0.00s (- 0.02%) 17.81s 18.40s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 21.50s (± 0.46%) 21.50s (± 0.64%) -0.00s (- 0.02%) 21.14s 21.77s
Angular - node (v8.9.0, x86)
Memory used 198,880k (± 0.02%) 198,876k (± 0.03%) -4k (- 0.00%) 198,784k 199,030k
Parse Time 2.43s (± 0.61%) 2.44s (± 0.59%) +0.01s (+ 0.33%) 2.42s 2.48s
Bind Time 1.02s (± 0.64%) 1.02s (± 1.05%) +0.00s (+ 0.29%) 1.01s 1.06s
Check Time 5.05s (± 0.62%) 5.07s (± 0.35%) +0.03s (+ 0.52%) 5.04s 5.12s
Emit Time 6.13s (± 1.05%) 6.13s (± 0.74%) -0.01s (- 0.10%) 6.04s 6.21s
Total Time 14.63s (± 0.53%) 14.66s (± 0.45%) +0.03s (+ 0.21%) 14.52s 14.81s
Compiler-Unions - node (v8.9.0, x86)
Memory used 127,971k (± 0.03%) 127,966k (± 0.02%) -5k (- 0.00%) 127,898k 128,050k
Parse Time 0.96s (± 0.71%) 0.96s (± 0.79%) -0.00s (- 0.10%) 0.95s 0.98s
Bind Time 0.50s (± 1.20%) 0.50s (± 1.77%) +0.00s (+ 0.20%) 0.49s 0.53s
Check Time 13.74s (± 0.53%) 13.69s (± 0.60%) -0.05s (- 0.39%) 13.55s 13.89s
Emit Time 2.68s (± 1.69%) 2.60s (± 0.78%) -0.07s (- 2.77%) 2.57s 2.66s
Total Time 17.88s (± 0.40%) 17.76s (± 0.51%) -0.12s (- 0.69%) 17.58s 17.94s
Monaco - node (v8.9.0, x86)
Memory used 203,189k (± 0.01%) 203,185k (± 0.01%) -5k (- 0.00%) 203,095k 203,244k
Parse Time 1.98s (± 0.85%) 1.98s (± 0.48%) -0.00s (- 0.15%) 1.95s 1.99s
Bind Time 0.72s (± 0.51%) 0.72s (± 0.77%) +0.00s (+ 0.28%) 0.71s 0.73s
Check Time 5.76s (± 1.20%) 5.77s (± 0.49%) +0.01s (+ 0.24%) 5.73s 5.86s
Emit Time 2.80s (± 2.51%) 2.77s (± 1.03%) -0.03s (- 0.96%) 2.72s 2.86s
Total Time 11.26s (± 0.24%) 11.24s (± 0.42%) -0.02s (- 0.17%) 11.16s 11.36s
TFS - node (v8.9.0, x86)
Memory used 177,591k (± 0.03%) 177,582k (± 0.02%) -10k (- 0.01%) 177,525k 177,649k
Parse Time 1.61s (± 0.83%) 1.62s (± 0.90%) +0.01s (+ 0.62%) 1.60s 1.66s
Bind Time 0.65s (± 1.26%) 0.66s (± 0.72%) +0.00s (+ 0.46%) 0.65s 0.67s
Check Time 4.86s (± 0.56%) 4.89s (± 0.73%) +0.03s (+ 0.60%) 4.80s 4.94s
Emit Time 2.87s (± 1.34%) 2.83s (± 0.94%) -0.04s (- 1.36%) 2.76s 2.88s
Total Time 10.00s (± 0.54%) 10.00s (± 0.43%) +0.00s (+ 0.04%) 9.89s 10.07s
material-ui - node (v8.9.0, x86)
Memory used 279,475k (± 0.01%) 279,476k (± 0.01%) +1k (+ 0.00%) 279,407k 279,553k
Parse Time 2.57s (± 0.73%) 2.54s (± 0.62%) -0.03s (- 1.01%) 2.51s 2.58s
Bind Time 0.71s (± 1.35%) 0.72s (± 6.45%) +0.02s (+ 2.69%) 0.68s 0.85s
Check Time 16.59s (± 0.79%) 16.55s (± 0.31%) -0.05s (- 0.30%) 16.42s 16.66s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 19.87s (± 0.70%) 19.82s (± 0.30%) -0.05s (- 0.28%) 19.62s 19.94s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-197-generic
Architecturex64
Available Memory16 GB
Available Memory12 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)
  • Compiler-Unions - node (v10.16.3, x64)
  • Compiler-Unions - node (v12.1.0, x64)
  • Compiler-Unions - node (v8.9.0, x64)
  • Compiler-Unions - 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 41841 10
Baseline master 10

@ahejlsberg
Copy link
Member Author

Yeah, as I suspected, there was something off about that first test run. The compiler-with-unions numbers are now basically unaffected. Interestingly, material-ui numbers seem to improve a little. Anyways, certainly no adverse perf impact.

@ahejlsberg ahejlsberg merged commit 646f5b3 into master Dec 8, 2020
@ahejlsberg ahejlsberg deleted the fix41756 branch December 8, 2020 02:38
@sandersn
Copy link
Member

sandersn commented Dec 8, 2020

This breaks styled-components on DT, although I haven't tracked down why yet. I'll file a bug when I do.

@sandersn
Copy link
Member

sandersn commented Dec 8, 2020

Here's the message:

 Type 'StyledComponentInnerComponent<C>' does not satisfy the constraint 'ElementType<any>'.
   Type 'string | ComponentClass<any, any> | FunctionComponent<any> | (C extends StyledComponent<infer I, any, any, never> ? I : C)' is not assignable to type 'ElementType<any>'.
     Type 'string' is not assignable to type 'ElementType<any>'.
       Type 'string | ComponentClass<any, any> | FunctionComponent<any>' is not assignable to type 'ElementType<any>'.
         Type 'string' is not assignable to type 'ElementType<any>'.
           Type 'StyledComponentInnerComponent<C>' is not assignable to type 'FunctionComponent<any>'.
             Type 'string | ComponentClass<any, any> | FunctionComponent<any> | (C extends StyledComponent<infer I, any, any, never> ? I : C)' is not assignable to type 'FunctionComponent<any>'.
               Type 'string' is not assignable to type 'FunctionComponent<any>'.
                 Type 'string | ComponentClass<any, any> | FunctionComponent<any>' is not assignable to type 'FunctionComponent<any>'.
                   Type 'string' is not assignable to type 'FunctionComponent<any>'.

@ahejlsberg
Copy link
Member Author

@sandersn That's odd. The DT suite run above was clean two days ago.

@sandersn
Copy link
Member

sandersn commented Dec 8, 2020

Looking at the logs, all four shards only tested mustache, so I think it's running in incremental mode by mistake.

@sandersn
Copy link
Member

sandersn commented Dec 9, 2020

Standalone repro is up at #41886

@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Milestone Bug PRs that fix a bug with a specific milestone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recursive conditional type throws maximum call stack size exceeded

6 participants