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

Consider base types in isArrayLikeType #43435

Merged
merged 2 commits into from
Mar 30, 2021

Conversation

andrewbranch
Copy link
Member

Fixes #43249

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Mar 30, 2021
@andrewbranch
Copy link
Member Author

@typescript-bot perf test this faster

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 30, 2021

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 30, 2021

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

Update: The results are in!

@andrewbranch
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 Mar 30, 2021

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 30, 2021

Heya @andrewbranch, I've started to run the extended test suite on this PR at 63c6346. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 30, 2021

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

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - master..43435

Metric master 43435 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 344,930k (± 0.02%) 344,944k (± 0.02%) +15k (+ 0.00%) 344,833k 345,058k
Parse Time 1.95s (± 1.47%) 1.95s (± 1.56%) -0.01s (- 0.41%) 1.91s 2.06s
Bind Time 0.84s (± 0.89%) 0.83s (± 0.54%) -0.00s (- 0.60%) 0.82s 0.84s
Check Time 5.12s (± 0.53%) 5.08s (± 0.31%) -0.04s (- 0.70%) 5.05s 5.11s
Emit Time 5.92s (± 0.58%) 5.91s (± 0.77%) -0.00s (- 0.07%) 5.86s 6.07s
Total Time 13.83s (± 0.48%) 13.77s (± 0.46%) -0.06s (- 0.40%) 13.67s 13.92s
Compiler-Unions - node (v10.16.3, x64)
Memory used 203,064k (± 0.15%) 203,267k (± 0.02%) +203k (+ 0.10%) 203,182k 203,371k
Parse Time 0.79s (± 0.76%) 0.78s (± 0.76%) -0.00s (- 0.13%) 0.77s 0.80s
Bind Time 0.53s (± 1.27%) 0.53s (± 1.13%) -0.00s (- 0.19%) 0.51s 0.54s
Check Time 7.50s (± 0.72%) 7.48s (± 0.70%) -0.02s (- 0.24%) 7.39s 7.61s
Emit Time 2.58s (± 0.86%) 2.58s (± 0.58%) +0.00s (+ 0.16%) 2.54s 2.61s
Total Time 11.39s (± 0.58%) 11.37s (± 0.51%) -0.02s (- 0.15%) 11.27s 11.50s
Monaco - node (v10.16.3, x64)
Memory used 342,707k (± 0.02%) 342,658k (± 0.01%) -50k (- 0.01%) 342,596k 342,770k
Parse Time 1.57s (± 1.47%) 1.56s (± 1.65%) -0.01s (- 0.70%) 1.54s 1.66s
Bind Time 0.74s (± 1.17%) 0.74s (± 0.54%) -0.00s (- 0.40%) 0.73s 0.75s
Check Time 5.27s (± 0.38%) 5.28s (± 0.65%) +0.02s (+ 0.32%) 5.21s 5.37s
Emit Time 3.14s (± 0.76%) 3.12s (± 1.01%) -0.02s (- 0.73%) 3.05s 3.20s
Total Time 10.72s (± 0.45%) 10.70s (± 0.56%) -0.02s (- 0.21%) 10.59s 10.90s
TFS - node (v10.16.3, x64)
Memory used 304,292k (± 0.02%) 304,289k (± 0.01%) -3k (- 0.00%) 304,241k 304,376k
Parse Time 1.22s (± 1.50%) 1.21s (± 1.40%) -0.01s (- 0.90%) 1.19s 1.27s
Bind Time 0.70s (± 0.70%) 0.70s (± 1.00%) -0.00s (- 0.43%) 0.69s 0.72s
Check Time 4.74s (± 0.35%) 4.72s (± 0.38%) -0.02s (- 0.40%) 4.70s 4.77s
Emit Time 3.28s (± 1.28%) 3.22s (± 1.41%) -0.05s (- 1.62%) 3.13s 3.33s
Total Time 9.95s (± 0.55%) 9.86s (± 0.45%) -0.09s (- 0.90%) 9.76s 9.97s
material-ui - node (v10.16.3, x64)
Memory used 465,575k (± 0.02%) 465,358k (± 0.02%) -218k (- 0.05%) 465,163k 465,531k
Parse Time 2.03s (± 2.15%) 2.02s (± 2.38%) -0.01s (- 0.39%) 1.98s 2.21s
Bind Time 0.66s (± 1.13%) 0.66s (± 0.91%) -0.01s (- 1.06%) 0.64s 0.67s
Check Time 14.29s (± 0.54%) 14.21s (± 0.63%) -0.08s (- 0.56%) 14.11s 14.47s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 16.99s (± 0.59%) 16.89s (± 0.59%) -0.10s (- 0.58%) 16.75s 17.14s
Angular - node (v12.1.0, x64)
Memory used 322,756k (± 0.03%) 322,694k (± 0.04%) -62k (- 0.02%) 322,400k 323,008k
Parse Time 1.93s (± 0.72%) 1.94s (± 1.13%) +0.01s (+ 0.62%) 1.89s 1.98s
Bind Time 0.81s (± 0.76%) 0.82s (± 0.54%) +0.01s (+ 0.86%) 0.81s 0.83s
Check Time 5.00s (± 0.37%) 5.03s (± 0.45%) +0.04s (+ 0.70%) 4.98s 5.08s
Emit Time 5.99s (± 0.65%) 6.04s (± 0.82%) +0.05s (+ 0.87%) 5.95s 6.19s
Total Time 13.73s (± 0.38%) 13.83s (± 0.46%) +0.10s (+ 0.74%) 13.67s 14.02s
Compiler-Unions - node (v12.1.0, x64)
Memory used 190,573k (± 0.11%) 190,217k (± 0.21%) -355k (- 0.19%) 189,049k 190,746k
Parse Time 0.76s (± 0.49%) 0.77s (± 0.98%) +0.01s (+ 1.18%) 0.76s 0.79s
Bind Time 0.53s (± 0.65%) 0.53s (± 0.98%) +0.00s (+ 0.76%) 0.52s 0.54s
Check Time 7.03s (± 0.60%) 7.02s (± 0.71%) -0.01s (- 0.13%) 6.91s 7.13s
Emit Time 2.55s (± 0.90%) 2.55s (± 1.22%) +0.00s (+ 0.04%) 2.47s 2.59s
Total Time 10.86s (± 0.57%) 10.87s (± 0.68%) +0.01s (+ 0.06%) 10.73s 11.04s
Monaco - node (v12.1.0, x64)
Memory used 325,050k (± 0.03%) 325,085k (± 0.01%) +35k (+ 0.01%) 324,962k 325,154k
Parse Time 1.55s (± 1.09%) 1.54s (± 0.64%) -0.01s (- 0.65%) 1.52s 1.56s
Bind Time 0.72s (± 0.92%) 0.72s (± 0.77%) +0.00s (+ 0.28%) 0.71s 0.73s
Check Time 5.12s (± 0.63%) 5.10s (± 0.52%) -0.02s (- 0.39%) 5.04s 5.16s
Emit Time 3.10s (± 0.64%) 3.10s (± 0.80%) -0.00s (- 0.03%) 3.06s 3.16s
Total Time 10.48s (± 0.47%) 10.46s (± 0.46%) -0.03s (- 0.26%) 10.36s 10.56s
TFS - node (v12.1.0, x64)
Memory used 288,770k (± 0.03%) 288,760k (± 0.02%) -10k (- 0.00%) 288,662k 288,873k
Parse Time 1.21s (± 0.83%) 1.22s (± 0.92%) +0.00s (+ 0.41%) 1.19s 1.24s
Bind Time 0.69s (± 0.75%) 0.69s (± 0.43%) +0.00s (+ 0.14%) 0.69s 0.70s
Check Time 4.66s (± 0.49%) 4.68s (± 0.56%) +0.02s (+ 0.41%) 4.60s 4.72s
Emit Time 3.15s (± 0.60%) 3.17s (± 1.02%) +0.02s (+ 0.51%) 3.11s 3.23s
Total Time 9.71s (± 0.44%) 9.75s (± 0.61%) +0.04s (+ 0.44%) 9.63s 9.85s
material-ui - node (v12.1.0, x64)
Memory used 443,735k (± 0.01%) 443,223k (± 0.09%) -512k (- 0.12%) 442,306k 443,648k
Parse Time 2.02s (± 0.66%) 2.02s (± 0.44%) -0.00s (- 0.10%) 2.01s 2.04s
Bind Time 0.64s (± 0.73%) 0.64s (± 0.96%) +0.00s (+ 0.16%) 0.63s 0.65s
Check Time 12.99s (± 0.63%) 12.92s (± 0.89%) -0.07s (- 0.54%) 12.72s 13.20s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.65s (± 0.53%) 15.58s (± 0.68%) -0.07s (- 0.45%) 15.41s 15.84s
Angular - node (v14.15.1, x64)
Memory used 321,275k (± 0.08%) 321,388k (± 0.01%) +113k (+ 0.04%) 321,327k 321,432k
Parse Time 1.94s (± 0.51%) 1.93s (± 0.38%) -0.01s (- 0.31%) 1.92s 1.95s
Bind Time 0.86s (± 0.72%) 0.87s (± 0.79%) +0.01s (+ 0.81%) 0.85s 0.88s
Check Time 5.05s (± 0.75%) 5.04s (± 0.54%) -0.01s (- 0.28%) 4.99s 5.11s
Emit Time 6.37s (± 1.09%) 6.32s (± 0.84%) -0.05s (- 0.78%) 6.24s 6.45s
Total Time 14.22s (± 0.73%) 14.15s (± 0.47%) -0.07s (- 0.46%) 14.04s 14.34s
Compiler-Unions - node (v14.15.1, x64)
Memory used 189,309k (± 0.13%) 189,395k (± 0.01%) +86k (+ 0.05%) 189,354k 189,469k
Parse Time 0.80s (± 0.42%) 0.80s (± 0.56%) -0.00s (- 0.12%) 0.79s 0.81s
Bind Time 0.56s (± 0.53%) 0.56s (± 0.53%) 0.00s ( 0.00%) 0.55s 0.56s
Check Time 7.13s (± 0.90%) 7.08s (± 0.95%) -0.06s (- 0.81%) 6.98s 7.24s
Emit Time 2.57s (± 1.28%) 2.54s (± 0.91%) -0.02s (- 0.93%) 2.48s 2.58s
Total Time 11.06s (± 0.69%) 10.98s (± 0.72%) -0.08s (- 0.76%) 10.82s 11.17s
Monaco - node (v14.15.1, x64)
Memory used 324,037k (± 0.01%) 324,071k (± 0.01%) +34k (+ 0.01%) 324,034k 324,127k
Parse Time 1.57s (± 0.92%) 1.57s (± 0.71%) -0.01s (- 0.57%) 1.54s 1.59s
Bind Time 0.74s (± 0.46%) 0.74s (± 0.75%) -0.00s (- 0.13%) 0.73s 0.76s
Check Time 5.06s (± 0.48%) 5.06s (± 0.55%) -0.00s (- 0.04%) 5.00s 5.11s
Emit Time 3.20s (± 0.71%) 3.17s (± 0.61%) -0.03s (- 0.81%) 3.14s 3.23s
Total Time 10.58s (± 0.38%) 10.54s (± 0.31%) -0.04s (- 0.37%) 10.48s 10.60s
TFS - node (v14.15.1, x64)
Memory used 287,697k (± 0.01%) 287,676k (± 0.01%) -21k (- 0.01%) 287,631k 287,717k
Parse Time 1.27s (± 1.04%) 1.26s (± 0.92%) -0.01s (- 0.63%) 1.24s 1.28s
Bind Time 0.72s (± 0.62%) 0.72s (± 1.54%) -0.00s (- 0.69%) 0.70s 0.75s
Check Time 4.69s (± 0.41%) 4.66s (± 0.64%) -0.02s (- 0.47%) 4.60s 4.74s
Emit Time 3.25s (± 0.51%) 3.24s (± 0.62%) -0.02s (- 0.58%) 3.20s 3.27s
Total Time 9.93s (± 0.39%) 9.88s (± 0.38%) -0.05s (- 0.52%) 9.80s 9.97s
material-ui - node (v14.15.1, x64)
Memory used 441,883k (± 0.06%) 441,832k (± 0.00%) -52k (- 0.01%) 441,801k 441,882k
Parse Time 2.09s (± 0.45%) 2.10s (± 0.52%) +0.01s (+ 0.29%) 2.08s 2.12s
Bind Time 0.69s (± 0.98%) 0.69s (± 0.96%) -0.00s (- 0.14%) 0.68s 0.71s
Check Time 13.01s (± 0.51%) 13.05s (± 0.59%) +0.04s (+ 0.29%) 12.89s 13.21s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.80s (± 0.45%) 15.84s (± 0.50%) +0.04s (+ 0.27%) 15.67s 16.02s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-206-generic
Architecturex64
Available Memory16 GB
Available Memory11 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v10.16.3, x64)
  • Compiler-Unions - node (v12.1.0, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v14.15.1, x64)
Benchmark Name Iterations
Current 43435 10
Baseline master 10

Developer Information:

Download Benchmark

@andrewbranch
Copy link
Member Author

@weswigham is it expected that without this shortcut, we hit the instantiation depth limiter trying to structurally compare the .flat() signatures? I suspect this is kind of a bandaid over a deeper bug, though possibly still a desirable change regardless.

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - master..43435

Metric master 43435 Delta Best Worst
Angular - node (v14.15.1, x64)
Memory used 321,275k (± 0.08%) 321,266k (± 0.07%) -9k (- 0.00%) 320,317k 321,426k
Parse Time 1.94s (± 0.51%) 1.95s (± 1.69%) +0.01s (+ 0.52%) 1.90s 2.07s
Bind Time 0.86s (± 0.72%) 0.87s (± 0.95%) +0.01s (+ 0.81%) 0.85s 0.89s
Check Time 5.05s (± 0.75%) 5.05s (± 1.01%) -0.00s (- 0.02%) 4.95s 5.21s
Emit Time 6.37s (± 1.09%) 6.36s (± 1.05%) -0.01s (- 0.20%) 6.27s 6.55s
Total Time 14.22s (± 0.73%) 14.22s (± 0.75%) +0.00s (+ 0.01%) 14.03s 14.55s
Compiler-Unions - node (v14.15.1, x64)
Memory used 189,309k (± 0.13%) 189,404k (± 0.01%) +95k (+ 0.05%) 189,353k 189,466k
Parse Time 0.80s (± 0.42%) 0.80s (± 0.59%) -0.00s (- 0.37%) 0.79s 0.81s
Bind Time 0.56s (± 0.53%) 0.56s (± 0.93%) +0.00s (+ 0.54%) 0.55s 0.58s
Check Time 7.13s (± 0.90%) 7.10s (± 0.88%) -0.03s (- 0.41%) 6.98s 7.26s
Emit Time 2.57s (± 1.28%) 2.55s (± 0.84%) -0.02s (- 0.66%) 2.49s 2.60s
Total Time 11.06s (± 0.69%) 11.01s (± 0.61%) -0.05s (- 0.44%) 10.82s 11.17s
Monaco - node (v14.15.1, x64)
Memory used 324,037k (± 0.01%) 324,070k (± 0.01%) +33k (+ 0.01%) 324,032k 324,112k
Parse Time 1.57s (± 0.92%) 1.58s (± 1.52%) +0.01s (+ 0.38%) 1.55s 1.67s
Bind Time 0.74s (± 0.46%) 0.75s (± 1.00%) +0.00s (+ 0.54%) 0.73s 0.76s
Check Time 5.06s (± 0.48%) 5.06s (± 0.42%) +0.00s (+ 0.06%) 5.03s 5.12s
Emit Time 3.20s (± 0.71%) 3.20s (± 0.56%) -0.00s (- 0.03%) 3.16s 3.23s
Total Time 10.58s (± 0.38%) 10.59s (± 0.43%) +0.01s (+ 0.13%) 10.49s 10.71s
TFS - node (v14.15.1, x64)
Memory used 287,697k (± 0.01%) 287,717k (± 0.01%) +19k (+ 0.01%) 287,671k 287,754k
Parse Time 1.27s (± 1.04%) 1.27s (± 1.25%) +0.00s (+ 0.00%) 1.24s 1.32s
Bind Time 0.72s (± 0.62%) 0.71s (± 0.70%) -0.01s (- 0.97%) 0.70s 0.72s
Check Time 4.69s (± 0.41%) 4.70s (± 0.61%) +0.01s (+ 0.28%) 4.64s 4.77s
Emit Time 3.25s (± 0.51%) 3.27s (± 0.53%) +0.01s (+ 0.34%) 3.23s 3.31s
Total Time 9.93s (± 0.39%) 9.95s (± 0.43%) +0.02s (+ 0.20%) 9.88s 10.07s
material-ui - node (v14.15.1, x64)
Memory used 441,883k (± 0.06%) 441,826k (± 0.00%) -58k (- 0.01%) 441,782k 441,845k
Parse Time 2.09s (± 0.45%) 2.11s (± 2.14%) +0.02s (+ 0.96%) 2.06s 2.29s
Bind Time 0.69s (± 0.98%) 0.70s (± 1.11%) +0.00s (+ 0.72%) 0.69s 0.72s
Check Time 13.01s (± 0.51%) 13.13s (± 1.02%) +0.11s (+ 0.88%) 12.85s 13.53s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.80s (± 0.45%) 15.94s (± 0.88%) +0.14s (+ 0.88%) 15.62s 16.35s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-206-generic
Architecturex64
Available Memory16 GB
Available Memory11 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v14.15.1, x64)
Benchmark Name Iterations
Current 43435 10
Baseline master 10

Developer Information:

Download Benchmark

@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.

@RyanCavanaugh
Copy link
Member

@typescript-bot cherry-pick this to release-4.3

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 30, 2021

Heya @RyanCavanaugh, I've started to run the task to cherry-pick this into release-4.3 on this PR at 63c6346. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

Hey @RyanCavanaugh, I've opened #43438 for you.

typescript-bot pushed a commit to typescript-bot/TypeScript that referenced this pull request Mar 30, 2021
Component commits:
684b039 Types that extend Array or ReadonlyArray are automatically array-like

63c6346 Add React repro to test
@andrewbranch andrewbranch merged commit b549467 into microsoft:master Mar 30, 2021
@andrewbranch andrewbranch deleted the bug/43249 branch March 30, 2021 20:18
andrewbranch added a commit that referenced this pull request Mar 30, 2021
Component commits:
684b039 Types that extend Array or ReadonlyArray are automatically array-like

63c6346 Add React repro to test

Co-authored-by: Andrew Branch <andrew@wheream.io>
ahejlsberg added a commit that referenced this pull request Apr 5, 2021
)

* Fix getRecursionIdentity, undo changes from #43435 (but keep tests)

* Remove test that takes excessively long to run

* Accept new baselines

* Fix formatting

* Add regression tests

* Reinstate test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

Excessive stack depth comparing types 'FlatArray<Arr, ?>' and 'FlatArray<Arr, ?>'.
4 participants