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

Better error message for unparenthesized function/constructor type notation in union/intersection types #39570

Merged
merged 10 commits into from
Jul 15, 2020

Conversation

uhyo
Copy link
Contributor

@uhyo uhyo commented Jul 12, 2020

Fixes #39548.

With this PR, we parse unparenthesized function types in union/intersection types anyway, and emit a specialized error message for them.

Example

type Foo = string | () => string;

type InstOrConst<T> = T | new () => T;

Current Behavior (TS 4.0 beta)

src/index.ts:1:22 - error TS1110: Type expected.

1 type Foo = string | () => string;
                       ~

src/index.ts:1:24 - error TS1005: ';' expected.

1 type Foo = string | () => string;
                         ~~

src/index.ts:3:31 - error TS1005: ';' expected.

3 type InstOrConst<T> = T | new () => T;
                                ~


Found 3 errors.

New Behavior

test.ts:1:20 - error TS1385: Function type notation must be parenthesized when used in a union type.

1 type Foo = string | () => string;
                     ~~~~~~~~~~~~~

test.ts:3:26 - error TS1386: Constructor type notation must be parenthesized when used in a union type.

3 type InstOrConst<T> = T | new () => T;
                           ~~~~~~~~~~~~


Found 2 errors.

Copy link
Member

@DanielRosenwasser DanielRosenwasser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the right approach. While I'd prefer passing a single piece of information for "is this a union or intersection", I'd be okay with weaving the diagnostics through. I'd like to get input from others though in case there's anything I'm missing.

Comment on lines 3573 to 3574
functionTypeDiagnostic: DiagnosticMessage,
constructorTypeDiagnostic: DiagnosticMessage
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of passing along the diagnostics, I might just pass along the information of whether or not this is a union type or an intersection type.

Copy link
Contributor Author

@uhyo uhyo Jul 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DanielRosenwasser Thank you for your reviews!
I updated this function so it now receives a single parameter isInUnionType: boolean.

src/compiler/parser.ts Outdated Show resolved Hide resolved
@DanielRosenwasser
Copy link
Member

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 13, 2020

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 13, 2020

Heya @DanielRosenwasser, I've started to run the tarball bundle task on this PR at 50ab58c. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 13, 2020

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 13, 2020

Hey @DanielRosenwasser, 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/79676/artifacts?artifactName=tgz&fileId=CAEFEC89E24E67B40E15B741ACFE99149C1B6B438BC664E0D1D8CC3F4DD9C90902&fileName=/typescript-4.0.0-insiders.20200713.tgz"
    }
}

and then running npm install.


There is also a playground for this build.

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - master..39570

Metric master 39570 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 343,513k (± 0.02%) 343,027k (± 0.02%) -486k (- 0.14%) 342,895k 343,205k
Parse Time 2.00s (± 0.58%) 2.01s (± 0.39%) +0.01s (+ 0.40%) 1.99s 2.02s
Bind Time 0.81s (± 0.69%) 0.81s (± 0.71%) +0.00s (+ 0.62%) 0.80s 0.83s
Check Time 4.74s (± 0.32%) 4.71s (± 0.53%) -0.03s (- 0.55%) 4.65s 4.77s
Emit Time 5.17s (± 0.82%) 5.17s (± 0.42%) -0.00s (- 0.06%) 5.10s 5.21s
Total Time 12.72s (± 0.41%) 12.70s (± 0.23%) -0.02s (- 0.17%) 12.63s 12.74s
Monaco - node (v10.16.3, x64)
Memory used 338,933k (± 0.03%) 339,002k (± 0.03%) +69k (+ 0.02%) 338,719k 339,324k
Parse Time 1.58s (± 1.08%) 1.58s (± 0.38%) -0.00s (- 0.19%) 1.57s 1.59s
Bind Time 0.71s (± 0.56%) 0.71s (± 0.52%) -0.00s (- 0.42%) 0.70s 0.71s
Check Time 4.87s (± 0.34%) 4.87s (± 0.29%) +0.01s (+ 0.18%) 4.85s 4.91s
Emit Time 2.74s (± 0.98%) 2.74s (± 0.57%) -0.01s (- 0.22%) 2.70s 2.78s
Total Time 9.90s (± 0.38%) 9.89s (± 0.23%) -0.00s (- 0.04%) 9.85s 9.95s
TFS - node (v10.16.3, x64)
Memory used 301,831k (± 0.01%) 301,947k (± 0.03%) +117k (+ 0.04%) 301,773k 302,220k
Parse Time 1.21s (± 0.39%) 1.21s (± 0.62%) +0.01s (+ 0.50%) 1.19s 1.22s
Bind Time 0.66s (± 1.06%) 0.67s (± 0.74%) +0.01s (+ 0.76%) 0.66s 0.68s
Check Time 4.37s (± 0.79%) 4.37s (± 0.46%) +0.00s (+ 0.05%) 4.33s 4.43s
Emit Time 2.87s (± 1.22%) 2.91s (± 0.65%) +0.03s (+ 1.18%) 2.85s 2.94s
Total Time 9.11s (± 0.63%) 9.15s (± 0.29%) +0.04s (+ 0.46%) 9.09s 9.20s
material-ui - node (v10.16.3, x64)
Memory used 459,043k (± 0.01%) 458,692k (± 0.01%) -351k (- 0.08%) 458,588k 458,852k
Parse Time 2.04s (± 0.50%) 2.05s (± 0.56%) +0.01s (+ 0.39%) 2.02s 2.07s
Bind Time 0.64s (± 1.73%) 0.65s (± 1.05%) +0.00s (+ 0.31%) 0.63s 0.66s
Check Time 12.86s (± 0.53%) 12.81s (± 0.36%) -0.05s (- 0.39%) 12.71s 12.92s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.54s (± 0.46%) 15.50s (± 0.28%) -0.04s (- 0.28%) 15.40s 15.61s
Angular - node (v12.1.0, x64)
Memory used 320,648k (± 0.08%) 320,343k (± 0.02%) -305k (- 0.10%) 320,233k 320,461k
Parse Time 1.99s (± 0.65%) 1.99s (± 0.51%) +0.00s (+ 0.05%) 1.97s 2.02s
Bind Time 0.80s (± 0.65%) 0.80s (± 0.75%) -0.00s (- 0.38%) 0.79s 0.81s
Check Time 4.63s (± 1.05%) 4.61s (± 0.46%) -0.02s (- 0.47%) 4.57s 4.65s
Emit Time 5.34s (± 1.00%) 5.35s (± 0.68%) +0.00s (+ 0.09%) 5.25s 5.42s
Total Time 12.76s (± 0.72%) 12.75s (± 0.47%) -0.02s (- 0.12%) 12.58s 12.85s
Monaco - node (v12.1.0, x64)
Memory used 321,383k (± 0.02%) 321,409k (± 0.01%) +26k (+ 0.01%) 321,310k 321,501k
Parse Time 1.54s (± 0.69%) 1.55s (± 0.69%) +0.01s (+ 0.45%) 1.53s 1.58s
Bind Time 0.69s (± 0.32%) 0.69s (± 0.69%) -0.00s (- 0.29%) 0.68s 0.70s
Check Time 4.66s (± 0.59%) 4.66s (± 0.26%) -0.00s (- 0.04%) 4.62s 4.68s
Emit Time 2.80s (± 0.92%) 2.79s (± 0.35%) -0.00s (- 0.14%) 2.77s 2.81s
Total Time 9.68s (± 0.46%) 9.68s (± 0.18%) +0.00s (+ 0.00%) 9.65s 9.73s
TFS - node (v12.1.0, x64)
Memory used 286,472k (± 0.02%) 286,502k (± 0.01%) +30k (+ 0.01%) 286,438k 286,588k
Parse Time 1.23s (± 0.57%) 1.23s (± 0.56%) -0.00s (- 0.33%) 1.21s 1.24s
Bind Time 0.64s (± 0.81%) 0.63s (± 0.57%) -0.01s (- 1.09%) 0.63s 0.64s
Check Time 4.28s (± 0.35%) 4.29s (± 0.27%) +0.00s (+ 0.12%) 4.26s 4.32s
Emit Time 2.90s (± 0.79%) 2.91s (± 0.66%) +0.00s (+ 0.10%) 2.87s 2.95s
Total Time 9.05s (± 0.26%) 9.06s (± 0.26%) +0.00s (+ 0.02%) 8.99s 9.09s
material-ui - node (v12.1.0, x64)
Memory used 437,369k (± 0.06%) 436,966k (± 0.07%) -404k (- 0.09%) 436,109k 437,262k
Parse Time 2.02s (± 0.59%) 2.03s (± 0.46%) +0.01s (+ 0.49%) 2.01s 2.06s
Bind Time 0.63s (± 0.58%) 0.63s (± 1.09%) 0.00s ( 0.00%) 0.61s 0.64s
Check Time 11.59s (± 1.11%) 11.52s (± 0.70%) -0.06s (- 0.56%) 11.39s 11.74s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 14.24s (± 0.89%) 14.18s (± 0.56%) -0.05s (- 0.36%) 14.03s 14.38s
Angular - node (v8.9.0, x64)
Memory used 340,031k (± 0.02%) 339,629k (± 0.02%) -402k (- 0.12%) 339,479k 339,767k
Parse Time 2.52s (± 0.24%) 2.54s (± 0.30%) +0.01s (+ 0.48%) 2.52s 2.55s
Bind Time 0.84s (± 0.73%) 0.84s (± 0.92%) -0.00s (- 0.24%) 0.83s 0.86s
Check Time 5.34s (± 0.27%) 5.32s (± 0.49%) -0.02s (- 0.36%) 5.28s 5.38s
Emit Time 5.89s (± 0.79%) 5.90s (± 0.91%) +0.00s (+ 0.08%) 5.71s 5.96s
Total Time 14.60s (± 0.36%) 14.59s (± 0.41%) -0.01s (- 0.08%) 14.40s 14.68s
Monaco - node (v8.9.0, x64)
Memory used 340,245k (± 0.02%) 340,248k (± 0.02%) +4k (+ 0.00%) 340,108k 340,348k
Parse Time 1.87s (± 0.43%) 1.88s (± 0.78%) +0.00s (+ 0.16%) 1.86s 1.93s
Bind Time 0.88s (± 0.53%) 0.88s (± 0.80%) -0.00s (- 0.11%) 0.87s 0.90s
Check Time 5.36s (± 0.53%) 5.38s (± 0.27%) +0.02s (+ 0.39%) 5.34s 5.41s
Emit Time 3.23s (± 0.79%) 3.25s (± 0.77%) +0.02s (+ 0.53%) 3.20s 3.30s
Total Time 11.34s (± 0.36%) 11.38s (± 0.36%) +0.04s (+ 0.38%) 11.32s 11.51s
TFS - node (v8.9.0, x64)
Memory used 303,673k (± 0.01%) 303,688k (± 0.01%) +15k (+ 0.00%) 303,579k 303,732k
Parse Time 1.53s (± 0.54%) 1.55s (± 0.32%) +0.01s (+ 0.72%) 1.54s 1.56s
Bind Time 0.67s (± 0.90%) 0.67s (± 0.87%) +0.00s (+ 0.30%) 0.66s 0.68s
Check Time 5.06s (± 1.43%) 5.06s (± 1.36%) +0.00s (+ 0.08%) 4.83s 5.14s
Emit Time 2.98s (± 3.05%) 2.94s (± 2.15%) -0.04s (- 1.41%) 2.86s 3.14s
Total Time 10.24s (± 0.40%) 10.21s (± 0.33%) -0.03s (- 0.27%) 10.14s 10.30s
material-ui - node (v8.9.0, x64)
Memory used 463,275k (± 0.01%) 462,964k (± 0.01%) -311k (- 0.07%) 462,905k 463,063k
Parse Time 2.40s (± 0.54%) 2.39s (± 0.53%) -0.00s (- 0.17%) 2.37s 2.42s
Bind Time 0.78s (± 1.50%) 0.77s (± 1.18%) -0.01s (- 0.77%) 0.76s 0.80s
Check Time 17.12s (± 0.75%) 17.21s (± 0.74%) +0.09s (+ 0.51%) 16.94s 17.43s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 20.29s (± 0.68%) 20.37s (± 0.62%) +0.08s (+ 0.38%) 20.11s 20.56s
Angular - node (v8.9.0, x86)
Memory used 195,090k (± 0.02%) 194,937k (± 0.02%) -153k (- 0.08%) 194,838k 195,034k
Parse Time 2.47s (± 0.89%) 2.45s (± 0.77%) -0.02s (- 0.97%) 2.42s 2.50s
Bind Time 0.98s (± 0.68%) 0.98s (± 0.88%) +0.00s (+ 0.51%) 0.96s 1.00s
Check Time 4.83s (± 0.82%) 4.80s (± 0.51%) -0.03s (- 0.58%) 4.72s 4.85s
Emit Time 5.90s (± 1.01%) 5.91s (± 0.49%) +0.00s (+ 0.03%) 5.86s 5.97s
Total Time 14.18s (± 0.49%) 14.13s (± 0.38%) -0.05s (- 0.34%) 14.05s 14.29s
Monaco - node (v8.9.0, x86)
Memory used 193,364k (± 0.02%) 193,402k (± 0.01%) +38k (+ 0.02%) 193,330k 193,455k
Parse Time 1.90s (± 0.32%) 1.91s (± 0.89%) +0.02s (+ 0.84%) 1.88s 1.95s
Bind Time 0.70s (± 1.00%) 0.69s (± 0.49%) -0.01s (- 0.86%) 0.69s 0.70s
Check Time 5.50s (± 0.45%) 5.47s (± 0.51%) -0.03s (- 0.55%) 5.41s 5.54s
Emit Time 2.67s (± 0.55%) 2.68s (± 1.93%) +0.01s (+ 0.37%) 2.62s 2.88s
Total Time 10.77s (± 0.36%) 10.75s (± 0.57%) -0.02s (- 0.14%) 10.66s 10.95s
TFS - node (v8.9.0, x86)
Memory used 173,655k (± 0.02%) 173,700k (± 0.03%) +45k (+ 0.03%) 173,568k 173,837k
Parse Time 1.59s (± 1.09%) 1.58s (± 0.51%) -0.01s (- 0.57%) 1.57s 1.60s
Bind Time 0.64s (± 1.10%) 0.64s (± 0.70%) -0.00s (- 0.16%) 0.63s 0.65s
Check Time 4.63s (± 0.63%) 4.63s (± 0.62%) -0.00s (- 0.09%) 4.56s 4.70s
Emit Time 2.76s (± 1.42%) 2.76s (± 1.00%) +0.00s (+ 0.04%) 2.70s 2.79s
Total Time 9.62s (± 0.69%) 9.61s (± 0.48%) -0.01s (- 0.11%) 9.47s 9.69s
material-ui - node (v8.9.0, x86)
Memory used 262,331k (± 0.01%) 262,211k (± 0.02%) -121k (- 0.05%) 262,118k 262,333k
Parse Time 2.43s (± 0.63%) 2.47s (± 1.27%) +0.04s (+ 1.52%) 2.41s 2.55s
Bind Time 0.66s (± 1.13%) 0.67s (± 2.21%) +0.01s (+ 1.21%) 0.65s 0.71s
Check Time 15.72s (± 0.76%) 15.60s (± 0.91%) -0.12s (- 0.76%) 15.32s 16.01s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 18.81s (± 0.65%) 18.73s (± 0.85%) -0.08s (- 0.43%) 18.47s 19.25s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-166-generic
Architecturex64
Available Memory16 GB
Available Memory1 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)
  • 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 39570 10
Baseline master 10

uhyo and others added 2 commits July 14, 2020 11:30
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just some minor style changes, and I want to make sure that performance is not hurt by the extra check, since isStartOfFunctionType does lookahead upon seeing a (.

src/compiler/parser.ts Outdated Show resolved Hide resolved
src/compiler/parser.ts Outdated Show resolved Hide resolved
src/compiler/parser.ts Outdated Show resolved Hide resolved
// the function type and constructor type shorthand notation
// are not allowed directly in unions and intersections, but we'll
// try to parse them gracefully and issue a helpful message.
if (isStartOfFunctionType() || token() === SyntaxKind.NewKeyword) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there an already-defined isStartOfConstructorType? I'll go check...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, but the only other call also is followed by || token() === SntaxKind.NewKeyword. Can you move that clause into the function?

diagnostic = Diagnostics.Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type;
}
}
parseErrorAtRange(type, diagnostic);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

side note: I bet this newish function could replace a lot of other lower-level error-reporting functions in the parser; it's only used 3 other places right now.

@sandersn
Copy link
Member

Hmm, parse time is frequently just baaarely significantly slower, and never significantly faster, so I'd call this a noticeable but very small slowdown. @DanielRosenwasser do you think this is still worth taking? I'd like to see a round or two of optimisation personally.

uhyo and others added 3 commits July 15, 2020 10:08
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
@uhyo
Copy link
Contributor Author

uhyo commented Jul 15, 2020

@sandersn Thank you for your reviews! I applied all your suggestions including refactoring isStartOfFunctionType to isStartOfFunctionTypeOrConstructorType.
As a non-team-member I have no strong opinion on the performance concern; if an optimization is needed, maybe we could first try parsing normally and fallback to function type parsing after encountering a parse error.

@DanielRosenwasser
Copy link
Member

@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 15, 2020

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

Update: The results are in!

if (token() === operator || hasLeadingOperator) {
const types = [type];
while (parseOptional(operator)) {
types.push(parseConstituentType());
types.push(parseFunctionOrConstructorTypeToError(operator === SyntaxKind.BarToken) || parseConstituentType());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can hoist operator === SyntaxKind.BarToken to isUnionType and share that at both locations.

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - master..39570

Metric master 39570 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 343,501k (± 0.02%) 343,060k (± 0.02%) -441k (- 0.13%) 342,964k 343,216k
Parse Time 2.00s (± 0.56%) 2.01s (± 0.47%) +0.00s (+ 0.05%) 1.99s 2.03s
Bind Time 0.81s (± 0.84%) 0.82s (± 1.26%) +0.01s (+ 0.98%) 0.81s 0.86s
Check Time 4.74s (± 0.47%) 4.72s (± 0.82%) -0.02s (- 0.42%) 4.66s 4.85s
Emit Time 5.18s (± 0.74%) 5.16s (± 0.94%) -0.02s (- 0.35%) 5.09s 5.32s
Total Time 12.73s (± 0.42%) 12.71s (± 0.56%) -0.03s (- 0.20%) 12.59s 12.86s
Monaco - node (v10.16.3, x64)
Memory used 338,946k (± 0.02%) 338,966k (± 0.02%) +20k (+ 0.01%) 338,783k 339,121k
Parse Time 1.58s (± 0.67%) 1.57s (± 0.46%) -0.00s (- 0.32%) 1.55s 1.59s
Bind Time 0.71s (± 0.91%) 0.71s (± 1.28%) +0.00s (+ 0.14%) 0.70s 0.74s
Check Time 4.88s (± 0.57%) 4.87s (± 0.42%) -0.01s (- 0.18%) 4.81s 4.91s
Emit Time 2.75s (± 0.27%) 2.76s (± 0.85%) +0.00s (+ 0.18%) 2.71s 2.81s
Total Time 9.92s (± 0.36%) 9.92s (± 0.24%) -0.01s (- 0.07%) 9.87s 9.97s
TFS - node (v10.16.3, x64)
Memory used 301,894k (± 0.02%) 301,887k (± 0.03%) -7k (- 0.00%) 301,734k 302,072k
Parse Time 1.21s (± 0.58%) 1.21s (± 0.63%) -0.00s (- 0.25%) 1.19s 1.23s
Bind Time 0.66s (± 0.98%) 0.66s (± 0.90%) +0.00s (+ 0.45%) 0.65s 0.68s
Check Time 4.37s (± 0.48%) 4.37s (± 0.47%) -0.00s (- 0.09%) 4.33s 4.42s
Emit Time 2.90s (± 0.64%) 2.87s (± 0.93%) -0.03s (- 1.07%) 2.80s 2.92s
Total Time 9.15s (± 0.30%) 9.11s (± 0.48%) -0.04s (- 0.42%) 8.98s 9.20s
material-ui - node (v10.16.3, x64)
Memory used 459,008k (± 0.01%) 458,761k (± 0.01%) -247k (- 0.05%) 458,679k 458,867k
Parse Time 2.04s (± 0.37%) 2.04s (± 0.34%) +0.01s (+ 0.29%) 2.03s 2.06s
Bind Time 0.65s (± 0.89%) 0.65s (± 1.46%) -0.00s (- 0.46%) 0.63s 0.66s
Check Time 12.85s (± 0.56%) 12.83s (± 0.42%) -0.02s (- 0.19%) 12.72s 12.94s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.54s (± 0.50%) 15.52s (± 0.35%) -0.02s (- 0.14%) 15.39s 15.62s
Angular - node (v12.1.0, x64)
Memory used 320,747k (± 0.02%) 320,356k (± 0.03%) -391k (- 0.12%) 320,243k 320,560k
Parse Time 1.98s (± 0.62%) 2.00s (± 0.69%) +0.01s (+ 0.71%) 1.97s 2.03s
Bind Time 0.80s (± 0.60%) 0.80s (± 0.73%) -0.00s (- 0.00%) 0.79s 0.81s
Check Time 4.60s (± 0.38%) 4.61s (± 0.51%) +0.01s (+ 0.22%) 4.56s 4.66s
Emit Time 5.33s (± 0.51%) 5.35s (± 0.80%) +0.01s (+ 0.23%) 5.27s 5.44s
Total Time 12.71s (± 0.23%) 12.74s (± 0.37%) +0.03s (+ 0.24%) 12.62s 12.84s
Monaco - node (v12.1.0, x64)
Memory used 321,459k (± 0.02%) 321,413k (± 0.03%) -46k (- 0.01%) 321,207k 321,626k
Parse Time 1.54s (± 0.88%) 1.53s (± 0.66%) -0.00s (- 0.26%) 1.51s 1.56s
Bind Time 0.68s (± 0.54%) 0.69s (± 0.87%) +0.00s (+ 0.00%) 0.68s 0.70s
Check Time 4.66s (± 0.42%) 4.65s (± 0.38%) -0.01s (- 0.26%) 4.61s 4.70s
Emit Time 2.80s (± 0.68%) 2.79s (± 0.62%) -0.01s (- 0.18%) 2.75s 2.84s
Total Time 9.68s (± 0.41%) 9.66s (± 0.33%) -0.02s (- 0.25%) 9.59s 9.71s
TFS - node (v12.1.0, x64)
Memory used 286,433k (± 0.02%) 286,449k (± 0.03%) +16k (+ 0.01%) 286,308k 286,614k
Parse Time 1.23s (± 0.41%) 1.22s (± 0.78%) -0.01s (- 0.73%) 1.20s 1.24s
Bind Time 0.64s (± 1.25%) 0.64s (± 0.91%) -0.00s (- 0.78%) 0.63s 0.65s
Check Time 4.27s (± 0.45%) 4.27s (± 0.63%) +0.00s (+ 0.02%) 4.22s 4.34s
Emit Time 2.90s (± 0.62%) 2.91s (± 1.30%) +0.01s (+ 0.31%) 2.85s 3.00s
Total Time 9.03s (± 0.21%) 9.03s (± 0.61%) -0.00s (- 0.03%) 8.92s 9.14s
material-ui - node (v12.1.0, x64)
Memory used 437,330k (± 0.05%) 436,873k (± 0.08%) -458k (- 0.10%) 436,029k 437,245k
Parse Time 2.01s (± 0.25%) 2.02s (± 0.37%) +0.01s (+ 0.45%) 2.01s 2.04s
Bind Time 0.62s (± 0.76%) 0.62s (± 0.76%) -0.00s (- 0.48%) 0.61s 0.63s
Check Time 11.55s (± 0.91%) 11.59s (± 0.88%) +0.03s (+ 0.29%) 11.35s 11.82s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 14.19s (± 0.75%) 14.23s (± 0.69%) +0.04s (+ 0.30%) 14.00s 14.46s
Angular - node (v8.9.0, x64)
Memory used 340,074k (± 0.02%) 339,646k (± 0.02%) -427k (- 0.13%) 339,450k 339,773k
Parse Time 2.53s (± 0.31%) 2.53s (± 0.54%) +0.00s (+ 0.04%) 2.50s 2.57s
Bind Time 0.84s (± 0.56%) 0.85s (± 0.43%) +0.01s (+ 0.71%) 0.84s 0.85s
Check Time 5.35s (± 0.56%) 5.30s (± 0.51%) -0.05s (- 0.92%) 5.24s 5.35s
Emit Time 5.88s (± 0.83%) 5.93s (± 0.83%) +0.04s (+ 0.76%) 5.75s 6.00s
Total Time 14.60s (± 0.41%) 14.60s (± 0.44%) -0.00s (- 0.03%) 14.40s 14.68s
Monaco - node (v8.9.0, x64)
Memory used 340,257k (± 0.01%) 340,244k (± 0.02%) -13k (- 0.00%) 340,134k 340,425k
Parse Time 1.87s (± 0.37%) 1.87s (± 0.50%) +0.00s (+ 0.11%) 1.86s 1.89s
Bind Time 0.88s (± 0.80%) 0.88s (± 0.51%) +0.00s (+ 0.34%) 0.87s 0.89s
Check Time 5.40s (± 0.40%) 5.38s (± 0.54%) -0.02s (- 0.30%) 5.33s 5.47s
Emit Time 3.23s (± 0.83%) 3.24s (± 0.91%) +0.01s (+ 0.37%) 3.19s 3.32s
Total Time 11.38s (± 0.36%) 11.38s (± 0.34%) -0.00s (- 0.04%) 11.29s 11.48s
TFS - node (v8.9.0, x64)
Memory used 303,658k (± 0.02%) 303,667k (± 0.02%) +8k (+ 0.00%) 303,540k 303,865k
Parse Time 1.54s (± 0.52%) 1.55s (± 0.92%) +0.00s (+ 0.19%) 1.52s 1.58s
Bind Time 0.66s (± 0.72%) 0.66s (± 0.87%) 0.00s ( 0.00%) 0.65s 0.67s
Check Time 5.06s (± 1.38%) 4.94s (± 1.27%) -0.12s (- 2.33%) 4.86s 5.11s
Emit Time 2.97s (± 2.36%) 3.09s (± 2.64%) +0.12s (+ 3.91%) 2.85s 3.19s
Total Time 10.24s (± 0.23%) 10.24s (± 0.31%) +0.00s (+ 0.00%) 10.17s 10.34s
material-ui - node (v8.9.0, x64)
Memory used 463,303k (± 0.02%) 462,996k (± 0.01%) -307k (- 0.07%) 462,927k 463,082k
Parse Time 2.39s (± 0.71%) 2.40s (± 0.47%) +0.00s (+ 0.17%) 2.37s 2.42s
Bind Time 0.77s (± 1.07%) 0.77s (± 1.20%) -0.00s (- 0.26%) 0.75s 0.79s
Check Time 17.13s (± 0.81%) 17.24s (± 0.43%) +0.11s (+ 0.64%) 17.05s 17.40s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 20.30s (± 0.72%) 20.41s (± 0.38%) +0.11s (+ 0.55%) 20.22s 20.56s
Angular - node (v8.9.0, x86)
Memory used 195,099k (± 0.03%) 194,931k (± 0.02%) -168k (- 0.09%) 194,837k 195,018k
Parse Time 2.46s (± 0.82%) 2.45s (± 0.67%) -0.02s (- 0.69%) 2.42s 2.48s
Bind Time 0.99s (± 1.08%) 0.98s (± 0.86%) -0.01s (- 1.21%) 0.96s 1.00s
Check Time 4.82s (± 0.46%) 4.80s (± 0.45%) -0.02s (- 0.50%) 4.74s 4.83s
Emit Time 5.89s (± 1.11%) 5.89s (± 0.78%) +0.00s (+ 0.02%) 5.78s 6.02s
Total Time 14.16s (± 0.50%) 14.11s (± 0.50%) -0.05s (- 0.37%) 13.93s 14.25s
Monaco - node (v8.9.0, x86)
Memory used 193,387k (± 0.01%) 193,410k (± 0.02%) +23k (+ 0.01%) 193,305k 193,511k
Parse Time 1.91s (± 0.49%) 1.91s (± 1.05%) +0.00s (+ 0.05%) 1.89s 1.98s
Bind Time 0.70s (± 0.52%) 0.69s (± 0.98%) -0.00s (- 0.29%) 0.69s 0.72s
Check Time 5.48s (± 0.41%) 5.47s (± 0.28%) -0.02s (- 0.33%) 5.43s 5.50s
Emit Time 2.68s (± 0.68%) 2.66s (± 0.95%) -0.02s (- 0.63%) 2.62s 2.75s
Total Time 10.77s (± 0.35%) 10.73s (± 0.45%) -0.04s (- 0.35%) 10.63s 10.85s
TFS - node (v8.9.0, x86)
Memory used 173,692k (± 0.03%) 173,691k (± 0.02%) -1k (- 0.00%) 173,614k 173,789k
Parse Time 1.59s (± 1.20%) 1.59s (± 0.91%) -0.00s (- 0.13%) 1.56s 1.63s
Bind Time 0.64s (± 0.58%) 0.63s (± 0.54%) -0.00s (- 0.31%) 0.63s 0.64s
Check Time 4.67s (± 1.20%) 4.65s (± 0.81%) -0.02s (- 0.41%) 4.59s 4.75s
Emit Time 2.80s (± 1.89%) 2.80s (± 1.78%) -0.00s (- 0.04%) 2.69s 2.94s
Total Time 9.69s (± 0.71%) 9.66s (± 0.68%) -0.03s (- 0.28%) 9.52s 9.78s
material-ui - node (v8.9.0, x86)
Memory used 262,370k (± 0.02%) 262,221k (± 0.01%) -149k (- 0.06%) 262,153k 262,280k
Parse Time 2.45s (± 0.66%) 2.44s (± 0.51%) -0.01s (- 0.45%) 2.42s 2.48s
Bind Time 0.67s (± 1.49%) 0.67s (± 2.71%) -0.00s (- 0.30%) 0.65s 0.72s
Check Time 15.60s (± 0.62%) 15.66s (± 0.73%) +0.06s (+ 0.37%) 15.44s 15.98s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 18.73s (± 0.60%) 18.77s (± 0.60%) +0.05s (+ 0.25%) 18.59s 19.07s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-166-generic
Architecturex64
Available Memory16 GB
Available Memory1 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)
  • 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 39570 10
Baseline master 10

uhyo and others added 2 commits July 15, 2020 15:16
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
@DanielRosenwasser
Copy link
Member

@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 15, 2020

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

Metric master 39570 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 343,550k (± 0.01%) 343,048k (± 0.02%) -501k (- 0.15%) 342,955k 343,243k
Parse Time 2.00s (± 0.55%) 2.02s (± 0.64%) +0.02s (+ 0.95%) 2.00s 2.06s
Bind Time 0.82s (± 0.98%) 0.81s (± 0.73%) -0.00s (- 0.49%) 0.80s 0.83s
Check Time 4.75s (± 0.54%) 4.72s (± 0.50%) -0.02s (- 0.53%) 4.69s 4.79s
Emit Time 5.17s (± 0.54%) 5.18s (± 0.53%) +0.01s (+ 0.14%) 5.09s 5.24s
Total Time 12.74s (± 0.32%) 12.74s (± 0.23%) -0.00s (- 0.02%) 12.68s 12.78s
Monaco - node (v10.16.3, x64)
Memory used 338,960k (± 0.02%) 338,921k (± 0.02%) -39k (- 0.01%) 338,739k 339,124k
Parse Time 1.57s (± 0.38%) 1.58s (± 0.79%) +0.01s (+ 0.64%) 1.54s 1.60s
Bind Time 0.71s (± 0.63%) 0.71s (± 0.47%) +0.00s (+ 0.28%) 0.70s 0.72s
Check Time 4.89s (± 0.62%) 4.92s (± 0.64%) +0.04s (+ 0.80%) 4.84s 5.00s
Emit Time 2.76s (± 1.72%) 2.75s (± 0.67%) -0.02s (- 0.54%) 2.71s 2.78s
Total Time 9.93s (± 0.60%) 9.97s (± 0.42%) +0.04s (+ 0.35%) 9.90s 10.05s
TFS - node (v10.16.3, x64)
Memory used 301,893k (± 0.02%) 301,907k (± 0.02%) +14k (+ 0.00%) 301,724k 302,066k
Parse Time 1.21s (± 0.56%) 1.21s (± 0.49%) +0.01s (+ 0.66%) 1.20s 1.22s
Bind Time 0.67s (± 0.55%) 0.66s (± 0.90%) -0.00s (- 0.15%) 0.65s 0.68s
Check Time 4.39s (± 0.40%) 4.42s (± 0.62%) +0.04s (+ 0.87%) 4.38s 4.48s
Emit Time 2.88s (± 1.00%) 2.90s (± 1.42%) +0.02s (+ 0.52%) 2.79s 2.99s
Total Time 9.14s (± 0.34%) 9.20s (± 0.55%) +0.06s (+ 0.67%) 9.12s 9.35s
material-ui - node (v10.16.3, x64)
Memory used 459,062k (± 0.01%) 458,748k (± 0.01%) -314k (- 0.07%) 458,660k 458,853k
Parse Time 2.04s (± 0.42%) 2.05s (± 0.61%) +0.02s (+ 0.74%) 2.03s 2.08s
Bind Time 0.65s (± 1.25%) 0.65s (± 1.46%) -0.00s (- 0.46%) 0.63s 0.67s
Check Time 12.79s (± 0.30%) 12.90s (± 0.67%) +0.10s (+ 0.78%) 12.77s 13.20s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.49s (± 0.28%) 15.60s (± 0.57%) +0.11s (+ 0.71%) 15.46s 15.91s
Angular - node (v12.1.0, x64)
Memory used 320,812k (± 0.02%) 320,294k (± 0.02%) -519k (- 0.16%) 320,197k 320,389k
Parse Time 1.98s (± 0.63%) 1.99s (± 0.84%) +0.00s (+ 0.15%) 1.96s 2.04s
Bind Time 0.80s (± 0.56%) 0.80s (± 0.45%) +0.01s (+ 0.75%) 0.80s 0.81s
Check Time 4.67s (± 0.48%) 4.66s (± 0.58%) -0.01s (- 0.30%) 4.62s 4.72s
Emit Time 5.36s (± 0.82%) 5.35s (± 0.99%) -0.01s (- 0.19%) 5.26s 5.49s
Total Time 12.81s (± 0.46%) 12.80s (± 0.38%) -0.01s (- 0.09%) 12.67s 12.90s
Monaco - node (v12.1.0, x64)
Memory used 321,419k (± 0.02%) 321,415k (± 0.03%) -4k (- 0.00%) 321,264k 321,596k
Parse Time 1.54s (± 0.93%) 1.54s (± 0.94%) -0.00s (- 0.06%) 1.51s 1.57s
Bind Time 0.68s (± 0.72%) 0.69s (± 0.90%) +0.01s (+ 0.73%) 0.68s 0.70s
Check Time 4.69s (± 0.64%) 4.71s (± 0.66%) +0.01s (+ 0.30%) 4.62s 4.77s
Emit Time 2.81s (± 0.75%) 2.79s (± 0.74%) -0.02s (- 0.68%) 2.75s 2.84s
Total Time 9.73s (± 0.57%) 9.73s (± 0.58%) +0.00s (+ 0.03%) 9.56s 9.84s
TFS - node (v12.1.0, x64)
Memory used 286,454k (± 0.03%) 286,492k (± 0.02%) +38k (+ 0.01%) 286,387k 286,669k
Parse Time 1.22s (± 0.79%) 1.25s (± 0.54%) +0.03s (+ 2.30%) 1.24s 1.27s
Bind Time 0.63s (± 0.75%) 0.64s (± 0.74%) +0.01s (+ 1.58%) 0.63s 0.65s
Check Time 4.30s (± 0.42%) 4.33s (± 0.43%) +0.03s (+ 0.63%) 4.29s 4.38s
Emit Time 2.93s (± 0.82%) 2.92s (± 0.76%) -0.01s (- 0.34%) 2.86s 2.97s
Total Time 9.08s (± 0.37%) 9.13s (± 0.30%) +0.05s (+ 0.54%) 9.07s 9.21s
material-ui - node (v12.1.0, x64)
Memory used 437,264k (± 0.08%) 437,162k (± 0.01%) -102k (- 0.02%) 437,028k 437,243k
Parse Time 2.02s (± 0.74%) 2.03s (± 0.40%) +0.00s (+ 0.20%) 2.01s 2.05s
Bind Time 0.63s (± 0.54%) 0.63s (± 1.10%) -0.00s (- 0.32%) 0.61s 0.64s
Check Time 11.57s (± 1.00%) 11.57s (± 0.59%) 0.00s ( 0.00%) 11.46s 11.73s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 14.22s (± 0.91%) 14.22s (± 0.53%) +0.00s (+ 0.02%) 14.13s 14.43s
Angular - node (v8.9.0, x64)
Memory used 340,095k (± 0.02%) 339,676k (± 0.02%) -419k (- 0.12%) 339,580k 339,821k
Parse Time 2.52s (± 0.46%) 2.53s (± 0.30%) +0.00s (+ 0.12%) 2.51s 2.54s
Bind Time 0.85s (± 1.26%) 0.84s (± 0.43%) -0.01s (- 0.59%) 0.84s 0.85s
Check Time 5.36s (± 0.55%) 5.39s (± 0.43%) +0.02s (+ 0.43%) 5.33s 5.44s
Emit Time 5.92s (± 1.41%) 5.88s (± 1.38%) -0.04s (- 0.76%) 5.69s 6.05s
Total Time 14.66s (± 0.64%) 14.64s (± 0.60%) -0.02s (- 0.16%) 14.41s 14.84s
Monaco - node (v8.9.0, x64)
Memory used 340,264k (± 0.01%) 340,244k (± 0.02%) -20k (- 0.01%) 340,103k 340,398k
Parse Time 1.87s (± 0.51%) 1.88s (± 0.54%) +0.01s (+ 0.37%) 1.86s 1.90s
Bind Time 0.88s (± 0.39%) 0.89s (± 0.77%) +0.01s (+ 1.03%) 0.87s 0.90s
Check Time 5.42s (± 0.43%) 5.41s (± 0.44%) -0.01s (- 0.20%) 5.35s 5.46s
Emit Time 3.22s (± 0.60%) 3.25s (± 1.19%) +0.03s (+ 0.93%) 3.16s 3.31s
Total Time 11.39s (± 0.26%) 11.42s (± 0.47%) +0.03s (+ 0.25%) 11.29s 11.51s
TFS - node (v8.9.0, x64)
Memory used 303,688k (± 0.01%) 303,713k (± 0.01%) +26k (+ 0.01%) 303,634k 303,785k
Parse Time 1.54s (± 0.52%) 1.55s (± 0.45%) +0.01s (+ 0.58%) 1.54s 1.57s
Bind Time 0.67s (± 0.71%) 0.67s (± 0.71%) +0.01s (+ 0.90%) 0.66s 0.68s
Check Time 5.08s (± 1.27%) 5.14s (± 1.40%) +0.06s (+ 1.16%) 4.91s 5.28s
Emit Time 3.00s (± 2.56%) 2.97s (± 2.27%) -0.03s (- 0.87%) 2.86s 3.18s
Total Time 10.29s (± 0.39%) 10.33s (± 0.40%) +0.04s (+ 0.41%) 10.24s 10.43s
material-ui - node (v8.9.0, x64)
Memory used 463,283k (± 0.01%) 463,005k (± 0.01%) -278k (- 0.06%) 462,894k 463,142k
Parse Time 2.39s (± 0.65%) 2.40s (± 0.62%) +0.01s (+ 0.50%) 2.38s 2.44s
Bind Time 0.77s (± 0.96%) 0.77s (± 0.91%) +0.00s (+ 0.13%) 0.76s 0.79s
Check Time 17.20s (± 0.57%) 17.12s (± 0.87%) -0.08s (- 0.44%) 16.77s 17.41s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 20.35s (± 0.49%) 20.29s (± 0.73%) -0.06s (- 0.30%) 19.92s 20.59s
Angular - node (v8.9.0, x86)
Memory used 195,085k (± 0.02%) 194,891k (± 0.01%) -194k (- 0.10%) 194,793k 194,952k
Parse Time 2.46s (± 1.34%) 2.45s (± 0.58%) -0.01s (- 0.24%) 2.42s 2.48s
Bind Time 0.98s (± 0.66%) 0.99s (± 1.38%) +0.01s (+ 1.02%) 0.95s 1.02s
Check Time 4.83s (± 0.41%) 4.84s (± 0.76%) +0.01s (+ 0.21%) 4.76s 4.91s
Emit Time 5.91s (± 0.57%) 5.93s (± 0.86%) +0.02s (+ 0.32%) 5.81s 6.03s
Total Time 14.17s (± 0.25%) 14.21s (± 0.41%) +0.04s (+ 0.25%) 14.11s 14.37s
Monaco - node (v8.9.0, x86)
Memory used 193,390k (± 0.02%) 193,367k (± 0.02%) -23k (- 0.01%) 193,307k 193,492k
Parse Time 1.91s (± 0.88%) 1.91s (± 0.89%) +0.00s (+ 0.00%) 1.88s 1.95s
Bind Time 0.70s (± 0.88%) 0.70s (± 0.83%) -0.00s (- 0.57%) 0.69s 0.71s
Check Time 5.51s (± 0.35%) 5.53s (± 0.45%) +0.02s (+ 0.44%) 5.48s 5.59s
Emit Time 2.65s (± 0.51%) 2.69s (± 1.26%) +0.04s (+ 1.66%) 2.63s 2.77s
Total Time 10.76s (± 0.44%) 10.83s (± 0.41%) +0.07s (+ 0.63%) 10.73s 10.90s
TFS - node (v8.9.0, x86)
Memory used 173,683k (± 0.02%) 173,676k (± 0.04%) -6k (- 0.00%) 173,579k 173,922k
Parse Time 1.59s (± 1.46%) 1.58s (± 0.51%) -0.02s (- 1.00%) 1.56s 1.59s
Bind Time 0.64s (± 1.25%) 0.64s (± 0.90%) +0.00s (+ 0.31%) 0.63s 0.65s
Check Time 4.66s (± 1.14%) 4.64s (± 0.47%) -0.01s (- 0.30%) 4.60s 4.71s
Emit Time 2.79s (± 1.09%) 2.78s (± 1.22%) -0.01s (- 0.47%) 2.70s 2.86s
Total Time 9.68s (± 0.77%) 9.64s (± 0.44%) -0.04s (- 0.46%) 9.55s 9.71s
material-ui - node (v8.9.0, x86)
Memory used 262,374k (± 0.02%) 262,217k (± 0.02%) -157k (- 0.06%) 262,072k 262,285k
Parse Time 2.45s (± 0.90%) 2.45s (± 0.65%) +0.00s (+ 0.16%) 2.42s 2.49s
Bind Time 0.67s (± 1.71%) 0.67s (± 1.57%) +0.00s (+ 0.15%) 0.66s 0.70s
Check Time 15.58s (± 0.76%) 15.69s (± 0.31%) +0.11s (+ 0.74%) 15.60s 15.78s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 18.70s (± 0.66%) 18.82s (± 0.28%) +0.12s (+ 0.63%) 18.71s 18.93s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-166-generic
Architecturex64
Available Memory16 GB
Available Memory1 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)
  • 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 39570 10
Baseline master 10

@DanielRosenwasser
Copy link
Member

These perf results seem weirdly suspicious. If the next one doesn't seem to have those same jumps, I think it's safe to call it a fluke.

@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 15, 2020

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

Metric master 39570 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 343,504k (± 0.03%) 343,059k (± 0.03%) -445k (- 0.13%) 342,778k 343,214k
Parse Time 2.02s (± 0.74%) 2.01s (± 0.60%) -0.00s (- 0.10%) 1.99s 2.04s
Bind Time 0.82s (± 0.68%) 0.82s (± 0.73%) -0.00s (- 0.37%) 0.80s 0.83s
Check Time 4.77s (± 0.84%) 4.75s (± 0.57%) -0.02s (- 0.44%) 4.70s 4.82s
Emit Time 5.20s (± 1.03%) 5.19s (± 0.92%) -0.01s (- 0.25%) 5.11s 5.30s
Total Time 12.80s (± 0.81%) 12.77s (± 0.58%) -0.03s (- 0.26%) 12.63s 12.94s
Monaco - node (v10.16.3, x64)
Memory used 338,928k (± 0.02%) 338,931k (± 0.03%) +3k (+ 0.00%) 338,647k 339,122k
Parse Time 1.59s (± 0.50%) 1.59s (± 0.41%) -0.00s (- 0.25%) 1.58s 1.60s
Bind Time 0.71s (± 0.81%) 0.71s (± 1.16%) +0.00s (+ 0.14%) 0.70s 0.74s
Check Time 4.90s (± 0.59%) 4.91s (± 0.54%) +0.01s (+ 0.18%) 4.83s 4.96s
Emit Time 2.75s (± 0.69%) 2.77s (± 0.74%) +0.02s (+ 0.80%) 2.72s 2.82s
Total Time 9.95s (± 0.51%) 9.98s (± 0.40%) +0.03s (+ 0.26%) 9.88s 10.03s
TFS - node (v10.16.3, x64)
Memory used 301,902k (± 0.02%) 301,910k (± 0.02%) +8k (+ 0.00%) 301,743k 302,033k
Parse Time 1.21s (± 0.56%) 1.22s (± 0.82%) +0.00s (+ 0.25%) 1.20s 1.24s
Bind Time 0.67s (± 0.67%) 0.67s (± 0.77%) +0.00s (+ 0.45%) 0.66s 0.68s
Check Time 4.41s (± 0.40%) 4.40s (± 0.73%) -0.00s (- 0.11%) 4.35s 4.50s
Emit Time 2.89s (± 1.37%) 2.90s (± 0.77%) +0.01s (+ 0.31%) 2.83s 2.95s
Total Time 9.18s (± 0.60%) 9.19s (± 0.55%) +0.01s (+ 0.12%) 9.07s 9.29s
material-ui - node (v10.16.3, x64)
Memory used 459,024k (± 0.01%) 458,734k (± 0.01%) -291k (- 0.06%) 458,628k 458,840k
Parse Time 2.04s (± 0.65%) 2.05s (± 0.43%) +0.01s (+ 0.49%) 2.03s 2.07s
Bind Time 0.65s (± 1.73%) 0.66s (± 0.91%) +0.01s (+ 0.77%) 0.64s 0.67s
Check Time 12.86s (± 0.58%) 12.88s (± 0.75%) +0.02s (+ 0.12%) 12.77s 13.14s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.55s (± 0.53%) 15.59s (± 0.63%) +0.03s (+ 0.21%) 15.48s 15.86s
Angular - node (v12.1.0, x64)
Memory used 320,776k (± 0.02%) 320,373k (± 0.03%) -403k (- 0.13%) 320,187k 320,519k
Parse Time 1.99s (± 0.55%) 1.99s (± 0.69%) -0.01s (- 0.25%) 1.95s 2.02s
Bind Time 0.80s (± 0.91%) 0.80s (± 0.59%) +0.01s (+ 0.63%) 0.79s 0.81s
Check Time 4.63s (± 0.29%) 4.63s (± 0.38%) -0.01s (- 0.15%) 4.59s 4.66s
Emit Time 5.35s (± 0.66%) 5.34s (± 0.34%) -0.01s (- 0.26%) 5.29s 5.37s
Total Time 12.78s (± 0.33%) 12.75s (± 0.26%) -0.02s (- 0.16%) 12.68s 12.83s
Monaco - node (v12.1.0, x64)
Memory used 321,453k (± 0.02%) 321,397k (± 0.02%) -57k (- 0.02%) 321,297k 321,523k
Parse Time 1.54s (± 0.89%) 1.55s (± 0.54%) +0.01s (+ 0.52%) 1.53s 1.56s
Bind Time 0.69s (± 0.72%) 0.69s (± 1.08%) +0.00s (+ 0.58%) 0.68s 0.71s
Check Time 4.67s (± 0.44%) 4.69s (± 0.52%) +0.02s (+ 0.49%) 4.64s 4.76s
Emit Time 2.80s (± 0.75%) 2.79s (± 0.81%) -0.01s (- 0.21%) 2.75s 2.84s
Total Time 9.70s (± 0.29%) 9.73s (± 0.32%) +0.03s (+ 0.32%) 9.66s 9.79s
TFS - node (v12.1.0, x64)
Memory used 286,435k (± 0.02%) 286,472k (± 0.02%) +37k (+ 0.01%) 286,321k 286,597k
Parse Time 1.23s (± 0.59%) 1.23s (± 0.76%) +0.00s (+ 0.41%) 1.22s 1.26s
Bind Time 0.64s (± 0.63%) 0.64s (± 0.70%) -0.00s (- 0.16%) 0.63s 0.65s
Check Time 4.33s (± 0.54%) 4.32s (± 0.53%) -0.01s (- 0.23%) 4.25s 4.35s
Emit Time 2.92s (± 0.87%) 2.93s (± 1.58%) +0.00s (+ 0.17%) 2.85s 3.09s
Total Time 9.12s (± 0.52%) 9.11s (± 0.67%) -0.00s (- 0.01%) 9.02s 9.32s
material-ui - node (v12.1.0, x64)
Memory used 437,377k (± 0.05%) 436,969k (± 0.07%) -408k (- 0.09%) 436,102k 437,299k
Parse Time 2.03s (± 0.76%) 2.03s (± 0.37%) +0.00s (+ 0.05%) 2.02s 2.05s
Bind Time 0.63s (± 0.82%) 0.62s (± 1.07%) -0.01s (- 1.27%) 0.61s 0.64s
Check Time 11.63s (± 0.74%) 11.61s (± 1.00%) -0.02s (- 0.13%) 11.43s 11.86s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 14.29s (± 0.62%) 14.27s (± 0.83%) -0.02s (- 0.13%) 14.08s 14.54s
Angular - node (v8.9.0, x64)
Memory used 340,082k (± 0.01%) 339,660k (± 0.01%) -422k (- 0.12%) 339,528k 339,744k
Parse Time 2.54s (± 0.54%) 2.54s (± 0.69%) 0.00s ( 0.00%) 2.52s 2.60s
Bind Time 0.85s (± 1.23%) 0.84s (± 1.05%) -0.01s (- 0.59%) 0.83s 0.87s
Check Time 5.38s (± 0.50%) 5.37s (± 0.50%) -0.01s (- 0.15%) 5.33s 5.44s
Emit Time 5.97s (± 0.55%) 5.90s (± 1.93%) -0.07s (- 1.17%) 5.69s 6.16s
Total Time 14.74s (± 0.42%) 14.66s (± 0.99%) -0.08s (- 0.57%) 14.40s 15.04s
Monaco - node (v8.9.0, x64)
Memory used 340,289k (± 0.01%) 340,252k (± 0.02%) -37k (- 0.01%) 340,110k 340,440k
Parse Time 1.88s (± 0.40%) 1.88s (± 0.40%) 0.00s ( 0.00%) 1.87s 1.90s
Bind Time 0.88s (± 0.25%) 0.88s (± 0.56%) +0.00s (+ 0.34%) 0.88s 0.90s
Check Time 5.45s (± 0.58%) 5.42s (± 0.45%) -0.03s (- 0.50%) 5.37s 5.50s
Emit Time 3.24s (± 0.71%) 3.23s (± 0.79%) -0.01s (- 0.25%) 3.18s 3.29s
Total Time 11.45s (± 0.37%) 11.41s (± 0.21%) -0.03s (- 0.29%) 11.37s 11.47s
TFS - node (v8.9.0, x64)
Memory used 303,677k (± 0.02%) 303,684k (± 0.02%) +7k (+ 0.00%) 303,518k 303,808k
Parse Time 1.54s (± 0.43%) 1.55s (± 0.58%) +0.00s (+ 0.19%) 1.53s 1.57s
Bind Time 0.67s (± 1.01%) 0.67s (± 0.77%) -0.00s (- 0.45%) 0.66s 0.68s
Check Time 5.12s (± 1.34%) 5.09s (± 1.71%) -0.04s (- 0.70%) 4.89s 5.24s
Emit Time 3.00s (± 2.63%) 3.00s (± 2.68%) -0.01s (- 0.17%) 2.85s 3.17s
Total Time 10.34s (± 0.45%) 10.30s (± 0.63%) -0.04s (- 0.35%) 10.19s 10.53s
material-ui - node (v8.9.0, x64)
Memory used 463,308k (± 0.02%) 463,003k (± 0.02%) -305k (- 0.07%) 462,878k 463,232k
Parse Time 2.39s (± 0.53%) 2.40s (± 0.63%) +0.01s (+ 0.50%) 2.37s 2.43s
Bind Time 0.77s (± 1.09%) 0.78s (± 1.05%) +0.01s (+ 1.69%) 0.77s 0.81s
Check Time 17.19s (± 0.46%) 17.11s (± 1.50%) -0.09s (- 0.51%) 16.59s 17.67s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 20.36s (± 0.34%) 20.29s (± 1.33%) -0.06s (- 0.31%) 19.76s 20.86s
Angular - node (v8.9.0, x86)
Memory used 195,115k (± 0.03%) 194,968k (± 0.03%) -148k (- 0.08%) 194,788k 195,054k
Parse Time 2.47s (± 0.72%) 2.46s (± 0.65%) -0.01s (- 0.57%) 2.42s 2.49s
Bind Time 0.99s (± 1.10%) 0.99s (± 1.16%) +0.00s (+ 0.10%) 0.96s 1.02s
Check Time 4.85s (± 0.62%) 4.85s (± 0.54%) -0.00s (- 0.04%) 4.80s 4.93s
Emit Time 5.93s (± 1.27%) 5.89s (± 0.90%) -0.04s (- 0.72%) 5.74s 5.98s
Total Time 14.25s (± 0.53%) 14.19s (± 0.43%) -0.05s (- 0.37%) 14.03s 14.32s
Monaco - node (v8.9.0, x86)
Memory used 193,371k (± 0.02%) 193,435k (± 0.02%) +64k (+ 0.03%) 193,349k 193,508k
Parse Time 1.91s (± 0.67%) 1.91s (± 0.66%) +0.00s (+ 0.05%) 1.89s 1.95s
Bind Time 0.70s (± 0.43%) 0.70s (± 0.92%) +0.00s (+ 0.57%) 0.69s 0.72s
Check Time 5.52s (± 0.74%) 5.55s (± 0.44%) +0.03s (+ 0.62%) 5.49s 5.59s
Emit Time 2.67s (± 0.67%) 2.69s (± 1.29%) +0.02s (+ 0.83%) 2.63s 2.77s
Total Time 10.79s (± 0.42%) 10.85s (± 0.43%) +0.06s (+ 0.57%) 10.77s 10.95s
TFS - node (v8.9.0, x86)
Memory used 173,666k (± 0.03%) 173,645k (± 0.02%) -21k (- 0.01%) 173,540k 173,714k
Parse Time 1.60s (± 0.65%) 1.58s (± 0.89%) -0.01s (- 0.88%) 1.56s 1.63s
Bind Time 0.64s (± 1.21%) 0.64s (± 0.73%) +0.00s (+ 0.16%) 0.63s 0.65s
Check Time 4.67s (± 0.58%) 4.69s (± 0.47%) +0.02s (+ 0.43%) 4.64s 4.75s
Emit Time 2.79s (± 1.41%) 2.77s (± 1.57%) -0.02s (- 0.65%) 2.68s 2.87s
Total Time 9.70s (± 0.65%) 9.69s (± 0.57%) -0.01s (- 0.11%) 9.58s 9.81s
material-ui - node (v8.9.0, x86)
Memory used 262,349k (± 0.02%) 262,239k (± 0.02%) -109k (- 0.04%) 262,090k 262,351k
Parse Time 2.46s (± 0.88%) 2.45s (± 0.66%) -0.01s (- 0.28%) 2.41s 2.50s
Bind Time 0.67s (± 1.56%) 0.67s (± 1.79%) +0.00s (+ 0.30%) 0.65s 0.69s
Check Time 15.63s (± 0.47%) 15.59s (± 0.59%) -0.04s (- 0.28%) 15.39s 15.75s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 18.76s (± 0.41%) 18.71s (± 0.51%) -0.05s (- 0.26%) 18.49s 18.89s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-166-generic
Architecturex64
Available Memory16 GB
Available Memory1 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)
  • 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 39570 10
Baseline master 10

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.

Gracefully parse and error on unparenthesized function/constructor types
4 participants