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

Properly handle duplicate enum types in type inference #42943

Merged
merged 2 commits into from
Feb 25, 2021
Merged

Conversation

ahejlsberg
Copy link
Member

Fixes #42932.

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Feb 24, 2021
@typescript-bot typescript-bot added For Milestone Bug PRs that fix a bug with a specific milestone and removed For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Feb 24, 2021
@DanielRosenwasser
Copy link
Member

@typescript-bot perf test this faster

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 25, 2021

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 25, 2021

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - master..42943

Metric master 42943 Delta Best Worst
Angular - node (v14.15.1, x64)
Memory used 322,408k (± 0.01%) 322,389k (± 0.01%) -19k (- 0.01%) 322,344k 322,424k
Parse Time 1.90s (± 0.30%) 1.90s (± 0.37%) +0.00s (+ 0.05%) 1.88s 1.92s
Bind Time 0.85s (± 0.78%) 0.85s (± 0.88%) -0.00s (- 0.35%) 0.83s 0.86s
Check Time 4.83s (± 0.38%) 4.85s (± 0.41%) +0.01s (+ 0.25%) 4.81s 4.89s
Emit Time 5.45s (± 0.40%) 5.47s (± 0.68%) +0.02s (+ 0.37%) 5.39s 5.55s
Total Time 13.04s (± 0.27%) 13.07s (± 0.36%) +0.03s (+ 0.20%) 13.00s 13.19s
Compiler-Unions - node (v14.15.1, x64)
Memory used 201,290k (± 0.55%) 201,996k (± 0.48%) +706k (+ 0.35%) 199,187k 203,037k
Parse Time 0.79s (± 0.51%) 0.79s (± 0.51%) 0.00s ( 0.00%) 0.78s 0.80s
Bind Time 0.53s (± 0.42%) 0.53s (± 0.64%) +0.00s (+ 0.38%) 0.53s 0.54s
Check Time 9.89s (± 0.53%) 9.85s (± 0.68%) -0.05s (- 0.48%) 9.74s 10.06s
Emit Time 2.36s (± 1.21%) 2.37s (± 1.63%) +0.01s (+ 0.47%) 2.30s 2.47s
Total Time 13.58s (± 0.39%) 13.55s (± 0.49%) -0.03s (- 0.26%) 13.39s 13.72s
Monaco - node (v14.15.1, x64)
Memory used 336,978k (± 0.01%) 336,966k (± 0.01%) -12k (- 0.00%) 336,917k 337,059k
Parse Time 1.55s (± 0.37%) 1.56s (± 0.85%) +0.01s (+ 0.45%) 1.54s 1.60s
Bind Time 0.73s (± 0.55%) 0.73s (± 0.71%) -0.00s (- 0.27%) 0.72s 0.74s
Check Time 4.93s (± 0.55%) 4.91s (± 0.44%) -0.02s (- 0.37%) 4.86s 4.96s
Emit Time 2.93s (± 0.70%) 2.91s (± 0.36%) -0.01s (- 0.44%) 2.89s 2.93s
Total Time 10.14s (± 0.36%) 10.11s (± 0.28%) -0.03s (- 0.27%) 10.02s 10.16s
TFS - node (v14.15.1, x64)
Memory used 291,614k (± 0.01%) 291,624k (± 0.00%) +10k (+ 0.00%) 291,604k 291,651k
Parse Time 1.24s (± 1.01%) 1.25s (± 1.23%) +0.01s (+ 0.97%) 1.22s 1.29s
Bind Time 0.69s (± 0.48%) 0.69s (± 0.52%) +0.00s (+ 0.58%) 0.69s 0.70s
Check Time 4.53s (± 0.22%) 4.52s (± 0.39%) -0.00s (- 0.11%) 4.49s 4.58s
Emit Time 3.03s (± 0.62%) 3.03s (± 0.65%) +0.01s (+ 0.23%) 2.99s 3.08s
Total Time 9.49s (± 0.32%) 9.50s (± 0.38%) +0.01s (+ 0.13%) 9.40s 9.58s
material-ui - node (v14.15.1, x64)
Memory used 469,502k (± 0.00%) 468,517k (± 0.00%) -985k (- 0.21%) 468,477k 468,573k
Parse Time 2.05s (± 0.97%) 2.06s (± 0.76%) +0.01s (+ 0.64%) 2.02s 2.09s
Bind Time 0.69s (± 0.69%) 0.70s (± 0.64%) +0.01s (+ 1.60%) 0.69s 0.71s
Check Time 12.82s (± 0.57%) 12.78s (± 0.59%) -0.05s (- 0.37%) 12.65s 13.01s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.56s (± 0.47%) 15.53s (± 0.53%) -0.03s (- 0.16%) 15.37s 15.77s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-198-generic
Architecturex64
Available Memory16 GB
Available Memory6 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 42943 10
Baseline master 10

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - master..42943

Metric master 42943 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 346,137k (± 0.03%) 346,079k (± 0.01%) -58k (- 0.02%) 346,004k 346,137k
Parse Time 1.91s (± 0.55%) 1.91s (± 0.59%) +0.00s (+ 0.21%) 1.89s 1.93s
Bind Time 0.82s (± 0.99%) 0.82s (± 0.58%) +0.00s (+ 0.37%) 0.81s 0.83s
Check Time 4.99s (± 0.36%) 4.97s (± 0.65%) -0.02s (- 0.38%) 4.90s 5.02s
Emit Time 5.24s (± 0.33%) 5.27s (± 0.70%) +0.03s (+ 0.48%) 5.19s 5.34s
Total Time 12.96s (± 0.23%) 12.97s (± 0.43%) +0.01s (+ 0.10%) 12.84s 13.10s
Compiler-Unions - node (v10.16.3, x64)
Memory used 214,696k (± 0.08%) 214,510k (± 0.08%) -186k (- 0.09%) 214,070k 214,889k
Parse Time 0.78s (± 0.61%) 0.77s (± 0.44%) -0.00s (- 0.51%) 0.77s 0.78s
Bind Time 0.50s (± 1.89%) 0.51s (± 1.21%) +0.01s (+ 0.99%) 0.50s 0.52s
Check Time 10.81s (± 0.55%) 10.70s (± 0.48%) -0.10s (- 0.94%) 10.60s 10.81s
Emit Time 2.33s (± 0.90%) 2.31s (± 1.13%) -0.02s (- 0.90%) 2.25s 2.35s
Total Time 14.42s (± 0.49%) 14.29s (± 0.39%) -0.12s (- 0.86%) 14.18s 14.42s
Monaco - node (v10.16.3, x64)
Memory used 355,354k (± 0.04%) 355,399k (± 0.02%) +45k (+ 0.01%) 355,238k 355,561k
Parse Time 1.55s (± 0.36%) 1.55s (± 0.79%) +0.00s (+ 0.19%) 1.52s 1.58s
Bind Time 0.72s (± 0.50%) 0.72s (± 0.82%) 0.00s ( 0.00%) 0.71s 0.74s
Check Time 5.14s (± 0.50%) 5.16s (± 0.45%) +0.02s (+ 0.33%) 5.10s 5.22s
Emit Time 2.80s (± 0.61%) 2.77s (± 0.73%) -0.03s (- 0.96%) 2.73s 2.83s
Total Time 10.21s (± 0.39%) 10.21s (± 0.42%) -0.01s (- 0.05%) 10.12s 10.30s
TFS - node (v10.16.3, x64)
Memory used 308,289k (± 0.02%) 308,283k (± 0.02%) -7k (- 0.00%) 308,167k 308,402k
Parse Time 1.20s (± 0.33%) 1.21s (± 0.73%) +0.01s (+ 0.75%) 1.20s 1.23s
Bind Time 0.68s (± 0.66%) 0.68s (± 0.65%) +0.00s (+ 0.59%) 0.67s 0.69s
Check Time 4.61s (± 0.49%) 4.63s (± 0.63%) +0.02s (+ 0.41%) 4.55s 4.68s
Emit Time 2.93s (± 1.09%) 2.92s (± 1.06%) -0.01s (- 0.38%) 2.84s 2.98s
Total Time 9.43s (± 0.47%) 9.45s (± 0.52%) +0.02s (+ 0.23%) 9.30s 9.54s
material-ui - node (v10.16.3, x64)
Memory used 492,980k (± 0.01%) 491,808k (± 0.01%) -1,172k (- 0.24%) 491,644k 491,887k
Parse Time 1.98s (± 0.56%) 1.99s (± 0.65%) +0.02s (+ 0.86%) 1.96s 2.02s
Bind Time 0.65s (± 1.03%) 0.65s (± 1.12%) +0.00s (+ 0.15%) 0.63s 0.66s
Check Time 14.09s (± 0.70%) 14.14s (± 0.83%) +0.05s (+ 0.36%) 13.95s 14.49s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 16.72s (± 0.63%) 16.79s (± 0.72%) +0.07s (+ 0.42%) 16.62s 17.13s
Angular - node (v12.1.0, x64)
Memory used 323,753k (± 0.02%) 323,692k (± 0.02%) -61k (- 0.02%) 323,537k 323,815k
Parse Time 1.90s (± 0.36%) 1.90s (± 0.61%) -0.00s (- 0.00%) 1.88s 1.93s
Bind Time 0.80s (± 0.86%) 0.80s (± 0.50%) +0.00s (+ 0.63%) 0.79s 0.81s
Check Time 4.87s (± 0.62%) 4.89s (± 0.48%) +0.02s (+ 0.41%) 4.85s 4.96s
Emit Time 5.42s (± 1.16%) 5.43s (± 0.59%) +0.01s (+ 0.15%) 5.32s 5.47s
Total Time 12.99s (± 0.56%) 13.02s (± 0.33%) +0.03s (+ 0.23%) 12.89s 13.12s
Compiler-Unions - node (v12.1.0, x64)
Memory used 200,090k (± 0.07%) 200,024k (± 0.06%) -66k (- 0.03%) 199,674k 200,278k
Parse Time 0.77s (± 0.64%) 0.77s (± 0.52%) +0.00s (+ 0.65%) 0.76s 0.78s
Bind Time 0.50s (± 0.68%) 0.51s (± 0.74%) +0.00s (+ 0.40%) 0.50s 0.51s
Check Time 9.90s (± 1.03%) 9.93s (± 1.20%) +0.03s (+ 0.34%) 9.76s 10.19s
Emit Time 2.35s (± 1.11%) 2.35s (± 0.65%) -0.01s (- 0.34%) 2.31s 2.39s
Total Time 13.52s (± 0.75%) 13.55s (± 0.96%) +0.03s (+ 0.24%) 13.35s 13.86s
Monaco - node (v12.1.0, x64)
Memory used 337,586k (± 0.02%) 337,534k (± 0.01%) -52k (- 0.02%) 337,385k 337,609k
Parse Time 1.53s (± 0.42%) 1.54s (± 0.83%) +0.01s (+ 0.92%) 1.52s 1.57s
Bind Time 0.70s (± 0.47%) 0.71s (± 1.08%) +0.01s (+ 0.71%) 0.70s 0.73s
Check Time 4.94s (± 0.43%) 4.96s (± 0.57%) +0.02s (+ 0.40%) 4.92s 5.06s
Emit Time 2.83s (± 0.41%) 2.84s (± 0.92%) +0.01s (+ 0.28%) 2.80s 2.89s
Total Time 10.00s (± 0.30%) 10.05s (± 0.50%) +0.05s (+ 0.49%) 9.96s 10.18s
TFS - node (v12.1.0, x64)
Memory used 292,425k (± 0.03%) 292,418k (± 0.02%) -7k (- 0.00%) 292,315k 292,627k
Parse Time 1.22s (± 0.61%) 1.22s (± 0.49%) +0.00s (+ 0.08%) 1.21s 1.24s
Bind Time 0.66s (± 0.52%) 0.66s (± 0.98%) +0.00s (+ 0.15%) 0.64s 0.67s
Check Time 4.54s (± 0.59%) 4.54s (± 0.56%) +0.01s (+ 0.18%) 4.48s 4.62s
Emit Time 2.92s (± 0.72%) 2.93s (± 0.73%) +0.01s (+ 0.34%) 2.88s 2.97s
Total Time 9.34s (± 0.50%) 9.35s (± 0.40%) +0.02s (+ 0.19%) 9.28s 9.45s
material-ui - node (v12.1.0, x64)
Memory used 470,600k (± 0.05%) 469,742k (± 0.01%) -858k (- 0.18%) 469,621k 469,893k
Parse Time 2.01s (± 0.62%) 2.00s (± 0.41%) -0.01s (- 0.55%) 1.98s 2.02s
Bind Time 0.64s (± 0.75%) 0.64s (± 0.75%) 0.00s ( 0.00%) 0.63s 0.65s
Check Time 12.75s (± 0.61%) 12.70s (± 0.58%) -0.05s (- 0.37%) 12.54s 12.86s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.40s (± 0.51%) 15.34s (± 0.50%) -0.06s (- 0.39%) 15.16s 15.49s
Angular - node (v14.15.1, x64)
Memory used 322,408k (± 0.01%) 322,378k (± 0.01%) -30k (- 0.01%) 322,317k 322,418k
Parse Time 1.90s (± 0.30%) 1.92s (± 0.90%) +0.02s (+ 0.89%) 1.89s 1.97s
Bind Time 0.85s (± 0.78%) 0.85s (± 0.66%) -0.00s (- 0.24%) 0.84s 0.86s
Check Time 4.83s (± 0.38%) 4.83s (± 0.30%) -0.01s (- 0.12%) 4.80s 4.85s
Emit Time 5.45s (± 0.40%) 5.48s (± 0.48%) +0.03s (+ 0.50%) 5.43s 5.56s
Total Time 13.04s (± 0.27%) 13.07s (± 0.28%) +0.03s (+ 0.25%) 12.98s 13.16s
Compiler-Unions - node (v14.15.1, x64)
Memory used 201,290k (± 0.55%) 200,507k (± 0.53%) -784k (- 0.39%) 199,188k 203,110k
Parse Time 0.79s (± 0.51%) 0.79s (± 0.47%) +0.00s (+ 0.51%) 0.79s 0.80s
Bind Time 0.53s (± 0.42%) 0.53s (± 0.00%) -0.00s (- 0.19%) 0.53s 0.53s
Check Time 9.89s (± 0.53%) 9.82s (± 0.64%) -0.07s (- 0.76%) 9.71s 10.00s
Emit Time 2.36s (± 1.21%) 2.36s (± 1.11%) +0.00s (+ 0.00%) 2.30s 2.43s
Total Time 13.58s (± 0.39%) 13.51s (± 0.41%) -0.07s (- 0.53%) 13.37s 13.63s
Monaco - node (v14.15.1, x64)
Memory used 336,978k (± 0.01%) 336,969k (± 0.01%) -10k (- 0.00%) 336,895k 337,068k
Parse Time 1.55s (± 0.37%) 1.56s (± 0.83%) +0.00s (+ 0.13%) 1.53s 1.59s
Bind Time 0.73s (± 0.55%) 0.73s (± 0.64%) -0.00s (- 0.14%) 0.72s 0.74s
Check Time 4.93s (± 0.55%) 4.91s (± 0.27%) -0.02s (- 0.32%) 4.89s 4.95s
Emit Time 2.93s (± 0.70%) 2.92s (± 0.46%) -0.00s (- 0.10%) 2.89s 2.95s
Total Time 10.14s (± 0.36%) 10.12s (± 0.18%) -0.02s (- 0.16%) 10.09s 10.16s
TFS - node (v14.15.1, x64)
Memory used 291,614k (± 0.01%) 291,624k (± 0.01%) +10k (+ 0.00%) 291,553k 291,660k
Parse Time 1.24s (± 1.01%) 1.27s (± 2.04%) +0.04s (+ 2.99%) 1.22s 1.33s
Bind Time 0.69s (± 0.48%) 0.69s (± 0.86%) +0.00s (+ 0.58%) 0.68s 0.71s
Check Time 4.53s (± 0.22%) 4.53s (± 0.41%) +0.00s (+ 0.09%) 4.50s 4.59s
Emit Time 3.03s (± 0.62%) 3.04s (± 0.83%) +0.02s (+ 0.56%) 2.98s 3.12s
Total Time 9.49s (± 0.32%) 9.55s (± 0.43%) +0.06s (+ 0.61%) 9.48s 9.65s
material-ui - node (v14.15.1, x64)
Memory used 469,502k (± 0.00%) 468,499k (± 0.00%) -1,004k (- 0.21%) 468,420k 468,536k
Parse Time 2.05s (± 0.97%) 2.05s (± 0.69%) +0.01s (+ 0.29%) 2.02s 2.08s
Bind Time 0.69s (± 0.69%) 0.69s (± 0.49%) +0.01s (+ 0.87%) 0.69s 0.70s
Check Time 12.82s (± 0.57%) 12.84s (± 0.65%) +0.02s (+ 0.16%) 12.63s 13.01s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.56s (± 0.47%) 15.59s (± 0.52%) +0.03s (+ 0.19%) 15.39s 15.76s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-198-generic
Architecturex64
Available Memory16 GB
Available Memory6 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 42943 10
Baseline master 10

@RyanCavanaugh
Copy link
Member

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 25, 2021

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

@typescript-bot
Copy link
Collaborator

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

This was referenced Mar 17, 2021
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.

Type Parameter Union Regression
4 participants