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

Fix contravariant type alias inference #31662

Merged
merged 3 commits into from
May 30, 2019
Merged

Conversation

ahejlsberg
Copy link
Member

Fixes #31659.

@ahejlsberg
Copy link
Member Author

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 29, 2019

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

typescript-bot commented May 29, 2019

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 29, 2019

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

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - master..31662

Metric master 31662 Delta Best Worst
Angular - node (v12.1.0, x64)
Memory used 315,000k (± 0.05%) 315,123k (± 0.02%) +123k (+ 0.04%) 314,903k 315,311k
Parse Time 1.38s (± 0.75%) 1.39s (± 0.34%) +0.01s (+ 0.87%) 1.38s 1.40s
Bind Time 0.72s (± 0.51%) 0.73s (± 0.00%) +0.01s (+ 0.69%) 0.73s 0.73s
Check Time 4.08s (± 0.37%) 4.11s (± 0.45%) +0.02s (+ 0.54%) 4.07s 4.16s
Emit Time 5.14s (± 0.72%) 5.16s (± 0.88%) +0.02s (+ 0.41%) 5.08s 5.27s
Total Time 11.33s (± 0.38%) 11.39s (± 0.41%) +0.06s (+ 0.51%) 11.29s 11.49s
Monaco - node (v12.1.0, x64)
Memory used 343,827k (± 0.02%) 343,850k (± 0.01%) +22k (+ 0.01%) 343,802k 343,946k
Parse Time 1.17s (± 0.66%) 1.18s (± 0.44%) +0.01s (+ 0.85%) 1.17s 1.19s
Bind Time 0.67s (± 0.97%) 0.67s (± 0.70%) +0.00s (+ 0.30%) 0.66s 0.68s
Check Time 4.17s (± 0.28%) 4.18s (± 0.48%) +0.02s (+ 0.41%) 4.14s 4.23s
Emit Time 2.76s (± 0.39%) 2.77s (± 0.50%) +0.01s (+ 0.36%) 2.74s 2.80s
Total Time 8.76s (± 0.24%) 8.80s (± 0.32%) +0.04s (+ 0.46%) 8.72s 8.85s
TFS - node (v12.1.0, x64)
Memory used 300,863k (± 0.01%) 300,822k (± 0.02%) -41k (- 0.01%) 300,658k 301,006k
Parse Time 0.90s (± 0.44%) 0.91s (± 0.93%) +0.01s (+ 0.89%) 0.89s 0.93s
Bind Time 0.62s (± 0.90%) 0.62s (± 0.76%) +0.00s (+ 0.32%) 0.61s 0.63s
Check Time 3.75s (± 0.49%) 3.75s (± 0.50%) -0.00s (- 0.03%) 3.72s 3.79s
Emit Time 2.86s (± 0.76%) 2.86s (± 0.99%) +0.00s (+ 0.07%) 2.80s 2.94s
Total Time 8.13s (± 0.45%) 8.14s (± 0.45%) +0.01s (+ 0.16%) 8.05s 8.25s
Angular - node (v8.9.0, x64)
Memory used 333,028k (± 0.02%) 333,047k (± 0.02%) +18k (+ 0.01%) 332,894k 333,144k
Parse Time 1.78s (± 0.73%) 1.78s (± 0.61%) -0.00s (- 0.17%) 1.75s 1.80s
Bind Time 0.78s (± 0.97%) 0.79s (± 1.01%) +0.01s (+ 1.02%) 0.78s 0.81s
Check Time 4.76s (± 1.19%) 4.79s (± 1.28%) +0.03s (+ 0.65%) 4.67s 4.89s
Emit Time 5.86s (± 2.21%) 5.88s (± 3.38%) +0.01s (+ 0.24%) 5.43s 6.20s
Total Time 13.19s (± 0.79%) 13.24s (± 1.22%) +0.05s (+ 0.38%) 12.87s 13.52s
Monaco - node (v8.9.0, x64)
Memory used 360,956k (± 0.02%) 361,013k (± 0.02%) +56k (+ 0.02%) 360,863k 361,144k
Parse Time 1.43s (± 0.59%) 1.43s (± 0.34%) +0.00s (+ 0.21%) 1.42s 1.44s
Bind Time 0.90s (± 2.30%) 0.91s (± 1.99%) +0.01s (+ 0.88%) 0.87s 0.94s
Check Time 4.99s (± 1.82%) 4.99s (± 1.68%) -0.00s (- 0.02%) 4.85s 5.19s
Emit Time 3.18s (± 6.43%) 3.25s (± 6.29%) +0.07s (+ 2.20%) 2.81s 3.53s
Total Time 10.50s (± 1.36%) 10.58s (± 1.39%) +0.08s (+ 0.75%) 10.25s 10.82s
TFS - node (v8.9.0, x64)
Memory used 316,340k (± 0.01%) 316,333k (± 0.01%) -8k (- 0.00%) 316,207k 316,468k
Parse Time 1.13s (± 0.42%) 1.13s (± 0.44%) +0.00s (+ 0.18%) 1.13s 1.15s
Bind Time 0.66s (± 0.79%) 0.66s (± 0.45%) +0.00s (+ 0.15%) 0.66s 0.67s
Check Time 4.33s (± 0.84%) 4.35s (± 0.40%) +0.02s (+ 0.39%) 4.32s 4.38s
Emit Time 3.10s (± 0.59%) 3.11s (± 0.85%) +0.01s (+ 0.23%) 3.04s 3.15s
Total Time 9.23s (± 0.45%) 9.26s (± 0.29%) +0.03s (+ 0.30%) 9.20s 9.30s
Angular - node (v8.9.0, x86)
Memory used 188,602k (± 0.02%) 188,662k (± 0.02%) +60k (+ 0.03%) 188,609k 188,739k
Parse Time 1.73s (± 0.87%) 1.71s (± 0.35%) -0.02s (- 0.98%) 1.70s 1.73s
Bind Time 0.93s (± 1.24%) 0.93s (± 0.73%) +0.01s (+ 0.86%) 0.92s 0.95s
Check Time 4.41s (± 0.48%) 4.43s (± 0.50%) +0.01s (+ 0.29%) 4.39s 4.47s
Emit Time 5.69s (± 1.02%) 5.62s (± 0.80%) -0.08s (- 1.33%) 5.50s 5.71s
Total Time 12.76s (± 0.60%) 12.69s (± 0.51%) -0.07s (- 0.54%) 12.54s 12.83s
Monaco - node (v8.9.0, x86)
Memory used 201,345k (± 0.02%) 201,353k (± 0.02%) +8k (+ 0.00%) 201,273k 201,438k
Parse Time 1.49s (± 0.44%) 1.49s (± 0.74%) -0.00s (- 0.07%) 1.47s 1.51s
Bind Time 0.71s (± 0.83%) 0.71s (± 0.95%) 0.00s ( 0.00%) 0.70s 0.73s
Check Time 4.76s (± 0.51%) 4.78s (± 0.75%) +0.02s (+ 0.36%) 4.71s 4.85s
Emit Time 3.10s (± 1.21%) 3.11s (± 1.13%) +0.01s (+ 0.45%) 3.06s 3.21s
Total Time 10.06s (± 0.55%) 10.09s (± 0.49%) +0.03s (+ 0.32%) 9.96s 10.19s
TFS - node (v8.9.0, x86)
Memory used 177,454k (± 0.02%) 177,429k (± 0.02%) -25k (- 0.01%) 177,339k 177,509k
Parse Time 1.19s (± 0.68%) 1.20s (± 0.75%) +0.01s (+ 0.50%) 1.17s 1.21s
Bind Time 0.63s (± 1.83%) 0.63s (± 1.41%) +0.00s (+ 0.79%) 0.62s 0.66s
Check Time 4.15s (± 0.59%) 4.17s (± 0.49%) +0.03s (+ 0.63%) 4.12s 4.23s
Emit Time 2.78s (± 0.67%) 2.76s (± 0.72%) -0.02s (- 0.76%) 2.70s 2.80s
Total Time 8.75s (± 0.44%) 8.76s (± 0.36%) +0.01s (+ 0.16%) 8.71s 8.82s
Angular - node (v9.0.0, x64)
Memory used 332,873k (± 0.02%) 332,943k (± 0.01%) +70k (+ 0.02%) 332,873k 333,075k
Parse Time 1.62s (± 0.85%) 1.62s (± 0.43%) +0.00s (+ 0.06%) 1.61s 1.64s
Bind Time 0.74s (± 1.05%) 0.74s (± 0.64%) +0.00s (+ 0.27%) 0.73s 0.75s
Check Time 4.50s (± 1.56%) 4.43s (± 0.63%) -0.06s (- 1.40%) 4.38s 4.51s
Emit Time 5.52s (± 2.09%) 5.70s (± 1.45%) +0.18s (+ 3.19%) 5.56s 5.91s
Total Time 12.38s (± 0.48%) 12.50s (± 0.64%) +0.12s (+ 0.93%) 12.36s 12.70s
Monaco - node (v9.0.0, x64)
Memory used 360,832k (± 0.02%) 360,814k (± 0.03%) -18k (- 0.01%) 360,614k 361,013k
Parse Time 1.28s (± 0.51%) 1.29s (± 0.81%) +0.01s (+ 0.47%) 1.27s 1.31s
Bind Time 0.85s (± 0.56%) 0.85s (± 0.47%) +0.00s (+ 0.47%) 0.84s 0.86s
Check Time 4.79s (± 0.43%) 4.79s (± 0.21%) -0.00s (- 0.06%) 4.77s 4.82s
Emit Time 3.28s (± 0.62%) 3.30s (± 0.39%) +0.01s (+ 0.37%) 3.26s 3.32s
Total Time 10.20s (± 0.37%) 10.22s (± 0.20%) +0.02s (+ 0.19%) 10.17s 10.27s
TFS - node (v9.0.0, x64)
Memory used 316,155k (± 0.01%) 316,188k (± 0.02%) +33k (+ 0.01%) 316,055k 316,361k
Parse Time 1.01s (± 0.90%) 1.00s (± 0.68%) -0.01s (- 0.69%) 0.99s 1.02s
Bind Time 0.61s (± 0.80%) 0.61s (± 0.78%) -0.00s (- 0.16%) 0.60s 0.62s
Check Time 4.33s (± 1.87%) 4.38s (± 1.93%) +0.05s (+ 1.20%) 4.22s 4.51s
Emit Time 3.07s (± 2.91%) 2.96s (± 3.39%) -0.12s (- 3.81%) 2.81s 3.14s
Total Time 9.03s (± 1.14%) 8.96s (± 0.33%) -0.07s (- 0.78%) 8.88s 9.01s
Angular - node (v9.0.0, x86)
Memory used 188,911k (± 0.03%) 188,944k (± 0.03%) +33k (+ 0.02%) 188,794k 189,073k
Parse Time 1.53s (± 0.86%) 1.53s (± 0.34%) -0.00s (- 0.20%) 1.52s 1.54s
Bind Time 0.87s (± 1.17%) 0.87s (± 1.13%) +0.00s (+ 0.11%) 0.85s 0.90s
Check Time 4.11s (± 0.40%) 4.14s (± 0.66%) +0.03s (+ 0.73%) 4.07s 4.18s
Emit Time 5.36s (± 0.48%) 5.34s (± 0.51%) -0.02s (- 0.35%) 5.26s 5.40s
Total Time 11.87s (± 0.27%) 11.88s (± 0.41%) +0.01s (+ 0.08%) 11.77s 12.00s
Monaco - node (v9.0.0, x86)
Memory used 201,397k (± 0.02%) 201,417k (± 0.03%) +20k (+ 0.01%) 201,296k 201,541k
Parse Time 1.31s (± 0.46%) 1.30s (± 0.73%) -0.01s (- 0.61%) 1.27s 1.31s
Bind Time 0.64s (± 0.73%) 0.64s (± 0.77%) -0.00s (- 0.63%) 0.63s 0.65s
Check Time 4.60s (± 0.59%) 4.59s (± 0.60%) -0.01s (- 0.11%) 4.54s 4.67s
Emit Time 3.00s (± 0.51%) 3.04s (± 0.92%) +0.04s (+ 1.27%) 2.99s 3.11s
Total Time 9.54s (± 0.27%) 9.56s (± 0.46%) +0.02s (+ 0.24%) 9.47s 9.69s
TFS - node (v9.0.0, x86)
Memory used 177,532k (± 0.02%) 177,519k (± 0.02%) -12k (- 0.01%) 177,447k 177,635k
Parse Time 1.02s (± 0.93%) 1.03s (± 0.75%) +0.00s (+ 0.49%) 1.01s 1.04s
Bind Time 0.58s (± 1.44%) 0.57s (± 0.83%) -0.00s (- 0.35%) 0.56s 0.58s
Check Time 4.03s (± 0.68%) 4.01s (± 0.59%) -0.01s (- 0.32%) 3.95s 4.06s
Emit Time 2.70s (± 0.75%) 2.69s (± 0.64%) -0.01s (- 0.30%) 2.65s 2.72s
Total Time 8.32s (± 0.41%) 8.30s (± 0.49%) -0.02s (- 0.24%) 8.18s 8.38s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-142-generic
Architecturex64
Available Memory16 GB
Available Memory1 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v12.1.0, x64)
  • node (v8.9.0, x64)
  • node (v8.9.0, x86)
  • node (v9.0.0, x64)
  • node (v9.0.0, x86)
Scenarios
  • Angular - node (v12.1.0, x64)
  • Angular - node (v8.9.0, x64)
  • Angular - node (v8.9.0, x86)
  • Angular - node (v9.0.0, x64)
  • Angular - node (v9.0.0, x86)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v8.9.0, x64)
  • Monaco - node (v8.9.0, x86)
  • Monaco - node (v9.0.0, x64)
  • Monaco - node (v9.0.0, x86)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v8.9.0, x64)
  • TFS - node (v8.9.0, x86)
  • TFS - node (v9.0.0, x64)
  • TFS - node (v9.0.0, x86)
Benchmark Name Iterations
Current 31662 10
Baseline master 10

@falsandtru
Copy link
Contributor

@ahejlsberg Can you review #31277?

@ahejlsberg ahejlsberg merged commit 82ea885 into master May 30, 2019
@ahejlsberg ahejlsberg deleted the fixTypeAliasInference branch May 30, 2019 21:09
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.

Inferences from type aliases disregard variance
4 participants