GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Faster exit from isTypeRelatedTo with identityRelation by ahejlsberg · Pull Request #36590 · microsoft/TypeScript

Conversation

@ahejlsberg

@ahejlsberg Anders Hejlsberg (ahejlsberg) commented Feb 3, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Reduces the total compile time of the test in #36564 by about 6%.

Fixes #36564.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

dragomirtitian, ulrichb, SlurpTheo, Terkwood, and borisyankov reacted with hooray emoji
All reactions
  • 🎉 5 reactions
@ahejlsberg
Faster exit from isTypeRelatedTo with identityRelation
c44f1a4
@ahejlsberg

Anders Hejlsberg (ahejlsberg) commented Feb 3, 2020

Copy link
Copy Markdown
Member Author

TypeScript Bot (@typescript-bot) run dt
TypeScript Bot (@typescript-bot) perf test this

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@typescript-bot

TypeScript Bot (typescript-bot) commented Feb 3, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

Update: The results are in!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@typescript-bot

TypeScript Bot (typescript-bot) commented Feb 3, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ahejlsberg
Anders Hejlsberg (ahejlsberg) requested a review from Andrew Casey (amcasey) February 3, 2020 23:19
@typescript-bot

TypeScript Bot (typescript-bot) commented Feb 3, 2020

Copy link
Copy Markdown
Contributor

Anders Hejlsberg (@ahejlsberg)
The results of the perf run you requested are in!

Here they are:

Comparison Report - master..36590

Metric master 36590 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 356,421k (± 0.01%) 358,169k (± 0.03%) +1,748k (+ 0.49%) 358,012k 358,414k
Parse Time 1.60s (± 0.50%) 1.61s (± 0.34%) +0.01s (+ 0.62%) 1.60s 1.62s
Bind Time 0.89s (± 0.77%) 0.88s (± 0.91%) -0.01s (- 0.79%) 0.86s 0.90s
Check Time 4.65s (± 0.54%) 4.65s (± 0.49%) +0.00s (+ 0.00%) 4.62s 4.73s
Emit Time 5.18s (± 0.52%) 5.19s (± 0.64%) +0.01s (+ 0.15%) 5.14s 5.30s
Total Time 12.32s (± 0.42%) 12.33s (± 0.36%) +0.01s (+ 0.08%) 12.27s 12.46s
Monaco - node (v10.16.3, x64)
Memory used 364,637k (± 0.01%) 364,664k (± 0.01%) +28k (+ 0.01%) 364,582k 364,746k
Parse Time 1.24s (± 0.77%) 1.25s (± 0.56%) +0.01s (+ 0.48%) 1.24s 1.27s
Bind Time 0.78s (± 0.48%) 0.77s (± 0.64%) -0.00s (- 0.13%) 0.77s 0.79s
Check Time 4.69s (± 0.48%) 4.68s (± 0.41%) -0.01s (- 0.30%) 4.63s 4.72s
Emit Time 2.90s (± 0.46%) 2.90s (± 0.48%) +0.00s (+ 0.03%) 2.88s 2.94s
Total Time 9.61s (± 0.34%) 9.60s (± 0.28%) -0.01s (- 0.07%) 9.55s 9.67s
TFS - node (v10.16.3, x64)
Memory used 324,095k (± 0.01%) 324,218k (± 0.07%) +123k (+ 0.04%) 323,950k 325,106k
Parse Time 0.95s (± 0.70%) 0.94s (± 0.62%) -0.01s (- 0.74%) 0.93s 0.95s
Bind Time 0.75s (± 1.00%) 0.75s (± 0.69%) +0.00s (+ 0.27%) 0.74s 0.76s
Check Time 4.25s (± 0.48%) 4.23s (± 0.58%) -0.02s (- 0.40%) 4.16s 4.28s
Emit Time 3.04s (± 0.82%) 3.00s (± 0.79%) -0.04s (- 1.32%) 2.94s 3.06s
Total Time 8.98s (± 0.39%) 8.92s (± 0.26%) -0.06s (- 0.70%) 8.87s 8.97s
Angular - node (v12.1.0, x64)
Memory used 332,321k (± 0.02%) 333,811k (± 0.10%) +1,490k (+ 0.45%) 332,511k 334,318k
Parse Time 1.56s (± 0.51%) 1.56s (± 0.45%) +0.00s (+ 0.19%) 1.54s 1.57s
Bind Time 0.86s (± 0.77%) 0.87s (± 0.77%) +0.00s (+ 0.46%) 0.86s 0.89s
Check Time 4.57s (± 0.59%) 4.57s (± 0.87%) 0.00s ( 0.00%) 4.53s 4.71s
Emit Time 5.37s (± 0.62%) 5.38s (± 0.42%) +0.00s (+ 0.06%) 5.32s 5.44s
Total Time 12.37s (± 0.24%) 12.38s (± 0.41%) +0.01s (+ 0.06%) 12.32s 12.56s
Monaco - node (v12.1.0, x64)
Memory used 344,524k (± 0.02%) 344,540k (± 0.01%) +16k (+ 0.00%) 344,486k 344,597k
Parse Time 1.21s (± 0.55%) 1.22s (± 0.94%) +0.01s (+ 0.66%) 1.19s 1.24s
Bind Time 0.75s (± 0.89%) 0.75s (± 1.17%) -0.00s (- 0.00%) 0.73s 0.77s
Check Time 4.54s (± 0.55%) 4.54s (± 0.49%) -0.00s (- 0.02%) 4.51s 4.60s
Emit Time 2.96s (± 1.17%) 2.95s (± 0.45%) -0.02s (- 0.57%) 2.91s 2.98s
Total Time 9.47s (± 0.51%) 9.46s (± 0.35%) -0.01s (- 0.14%) 9.39s 9.52s
TFS - node (v12.1.0, x64)
Memory used 306,373k (± 0.01%) 306,380k (± 0.02%) +6k (+ 0.00%) 306,248k 306,490k
Parse Time 0.94s (± 0.55%) 0.94s (± 0.47%) +0.00s (+ 0.32%) 0.93s 0.95s
Bind Time 0.71s (± 0.85%) 0.71s (± 1.06%) +0.00s (+ 0.28%) 0.70s 0.73s
Check Time 4.18s (± 0.51%) 4.19s (± 0.42%) +0.02s (+ 0.38%) 4.15s 4.23s
Emit Time 3.05s (± 0.73%) 3.08s (± 0.55%) +0.02s (+ 0.72%) 3.04s 3.11s
Total Time 8.87s (± 0.48%) 8.92s (± 0.32%) +0.05s (+ 0.55%) 8.87s 8.99s
Angular - node (v8.9.0, x64)
Memory used 351,509k (± 0.01%) 353,176k (± 0.01%) +1,668k (+ 0.47%) 353,072k 353,275k
Parse Time 2.10s (± 0.48%) 2.11s (± 0.47%) +0.02s (+ 0.81%) 2.09s 2.13s
Bind Time 0.92s (± 0.92%) 0.94s (± 0.87%) +0.02s (+ 2.06%) 0.93s 0.96s
Check Time 5.46s (± 0.64%) 5.43s (± 0.78%) -0.03s (- 0.46%) 5.32s 5.55s
Emit Time 6.21s (± 0.73%) 6.19s (± 0.64%) -0.02s (- 0.31%) 6.12s 6.30s
Total Time 14.69s (± 0.46%) 14.68s (± 0.54%) -0.01s (- 0.04%) 14.54s 14.94s
Monaco - node (v8.9.0, x64)
Memory used 362,875k (± 0.01%) 362,911k (± 0.01%) +36k (+ 0.01%) 362,849k 362,980k
Parse Time 1.56s (± 0.72%) 1.56s (± 0.43%) +0.00s (+ 0.13%) 1.54s 1.57s
Bind Time 0.95s (± 0.70%) 0.95s (± 0.52%) -0.00s (- 0.42%) 0.94s 0.96s
Check Time 5.41s (± 1.58%) 5.39s (± 1.63%) -0.02s (- 0.35%) 5.24s 5.61s
Emit Time 3.23s (± 4.81%) 3.25s (± 5.07%) +0.02s (+ 0.56%) 2.95s 3.50s
Total Time 11.15s (± 0.89%) 11.14s (± 0.88%) -0.01s (- 0.04%) 10.95s 11.32s
TFS - node (v8.9.0, x64)
Memory used 323,458k (± 0.01%) 323,423k (± 0.01%) -36k (- 0.01%) 323,317k 323,496k
Parse Time 1.25s (± 0.30%) 1.26s (± 0.27%) +0.01s (+ 0.64%) 1.26s 1.27s
Bind Time 0.76s (± 0.59%) 0.76s (± 0.44%) +0.00s (+ 0.26%) 0.75s 0.77s
Check Time 4.83s (± 0.49%) 4.82s (± 0.20%) -0.01s (- 0.23%) 4.79s 4.84s
Emit Time 3.19s (± 0.71%) 3.20s (± 0.70%) +0.00s (+ 0.16%) 3.14s 3.23s
Total Time 10.04s (± 0.34%) 10.04s (± 0.22%) +0.00s (+ 0.03%) 9.99s 10.09s
Angular - node (v8.9.0, x86)
Memory used 199,873k (± 0.03%) 200,725k (± 0.03%) +853k (+ 0.43%) 200,634k 200,867k
Parse Time 2.03s (± 0.58%) 2.05s (± 0.89%) +0.01s (+ 0.69%) 2.02s 2.11s
Bind Time 1.04s (± 0.78%) 1.05s (± 0.28%) +0.01s (+ 0.86%) 1.05s 1.06s
Check Time 4.97s (± 0.37%) 4.95s (± 0.51%) -0.02s (- 0.48%) 4.88s 5.00s
Emit Time 6.09s (± 1.90%) 6.09s (± 1.35%) +0.00s (+ 0.03%) 6.00s 6.35s
Total Time 14.13s (± 0.93%) 14.14s (± 0.69%) +0.00s (+ 0.01%) 13.96s 14.43s
Monaco - node (v8.9.0, x86)
Memory used 203,723k (± 0.02%) 203,747k (± 0.02%) +24k (+ 0.01%) 203,669k 203,821k
Parse Time 1.60s (± 0.93%) 1.60s (± 0.53%) -0.01s (- 0.37%) 1.58s 1.62s
Bind Time 0.77s (± 0.78%) 0.77s (± 0.62%) +0.00s (+ 0.13%) 0.76s 0.78s
Check Time 5.16s (± 1.38%) 5.15s (± 1.23%) -0.02s (- 0.31%) 5.03s 5.31s
Emit Time 3.13s (± 2.59%) 3.17s (± 1.28%) +0.03s (+ 1.05%) 3.03s 3.25s
Total Time 10.67s (± 0.57%) 10.68s (± 0.41%) +0.01s (+ 0.10%) 10.61s 10.81s
TFS - node (v8.9.0, x86)
Memory used 182,614k (± 0.03%) 182,586k (± 0.02%) -29k (- 0.02%) 182,474k 182,686k
Parse Time 1.31s (± 1.09%) 1.32s (± 1.18%) +0.01s (+ 1.00%) 1.30s 1.37s
Bind Time 0.71s (± 0.99%) 0.71s (± 0.83%) +0.00s (+ 0.71%) 0.70s 0.73s
Check Time 4.54s (± 0.50%) 4.57s (± 0.68%) +0.03s (+ 0.75%) 4.51s 4.65s
Emit Time 2.97s (± 0.73%) 2.95s (± 1.20%) -0.02s (- 0.77%) 2.86s 3.03s
Total Time 9.53s (± 0.33%) 9.56s (± 0.64%) +0.03s (+ 0.27%) 9.41s 9.70s
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 36590 10
Baseline master 10

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ahejlsberg
Reorganize a bit
d6d9dd7
@amcasey

Andrew Casey (amcasey) commented Feb 4, 2020

Copy link
Copy Markdown
Member

TypeScript Bot (@typescript-bot) pack this

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@typescript-bot

TypeScript Bot (typescript-bot) commented Feb 4, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Heya Andrew Casey (@amcasey), I've started to run the tarball bundle task on this PR at d6d9dd7. You can monitor the build here. It should now contribute to this PR's status checks.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@typescript-bot

TypeScript Bot (typescript-bot) commented Feb 4, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Hey Andrew Casey (@amcasey), I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
    "devDependencies": {
        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/63158/artifacts?artifactName=tgz&fileId=A987F38F6364514260C7A68F64FA1F26CC816EB374A422F9891F2C151AB1791A02&fileName=/typescript-3.8.0-insiders.20200204.tgz"
    }
}

and then running npm install.


There is also a playground for this build.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh) approved these changes Feb 4, 2020
View reviewed changes
@amcasey

Andrew Casey (amcasey) commented Feb 4, 2020

Copy link
Copy Markdown
Member

10-run average from the original machine shows a 7% improvement. Very nice!

ahejlsberg and SlurpTheo reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ahejlsberg
Anders Hejlsberg (ahejlsberg) merged commit 0a16032 into master Feb 6, 2020
@sandersn
Nathan Shively-Sanders (sandersn) deleted the optimizeIdentityRelation branch February 7, 2020 16:53
@sandersn

Nathan Shively-Sanders (sandersn) commented Feb 7, 2020

Copy link
Copy Markdown
Member

This change fixes a failure in checking in @types/mongoose of the form:

interface E {
    stack: string;
}
declare var y: E | undefined
declare var x: E;
var x = y; // error expected here, but none given
x.stack

It's very surprising to me that we didn't give an error here before. Note that we did give an error for number | undefined.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sandersn

Nathan Shively-Sanders (sandersn) commented Feb 7, 2020

Copy link
Copy Markdown
Member

Maybe it's because we weren't strictly checking duplicate declaration sites before. Normal code like var x: E | undefined = y gives the error before this change.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot mentioned this pull request Aug 14, 2022
Remove span tag in title and unnecessary TOC in Ko microsoft/TypeScript-Website-Localizations#164
Merged
@microsoft Microsoft (microsoft) locked as resolved and limited conversation to collaborators Oct 21, 2025
@typescript-bot TypeScript Bot (typescript-bot) assigned Anders Hejlsberg (ahejlsberg) Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@RyanCavanaugh Ryan Cavanaugh (RyanCavanaugh) RyanCavanaugh approved these changes
@amcasey Andrew Casey (amcasey) Awaiting requested review from amcasey

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@ahejlsberg Anders Hejlsberg (ahejlsberg)

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Performance regression in #33252

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@ahejlsberg @typescript-bot @amcasey @sandersn @RyanCavanaugh
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.