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 arrow expressions in conditional expressions, take N+1 #49531

Merged
merged 6 commits into from
Jun 17, 2022

Conversation

jakebailey
Copy link
Member

Fixes #16241
See also: #48733

This is a revert of PR #48940 with #48788 applied.

I previously described #48788 as "permissive"; this is accurate in the sense that all of the existing TS code that we found in the wild is parsed correctly without a change in meaning. However, this does not compromise on the ideal that if it's legal JS, then we should parse it as such; the effect of this PR should be to get everything working as expected.

I recommend ignoring the first commit for sake of viewing the diff, as it's just setting up the tests in such a way to make sure we can view the JS and TS code side by side with the output.


If it's legal JS, we want to parse it as such. This means that in cases where the code is legal JS, we should see that:

  1. The input JS should match the output JS.
  2. The output of the TS file (containing the same code) should match the output of the JS file.

If it's a syntax error in JS, then we are free to interpret it how we need, i.e. to support TS features. Many of the tests are not legal JS.

@typescript-bot typescript-bot added the For Milestone Bug PRs that fix a bug with a specific milestone label Jun 13, 2022
@jakebailey jakebailey changed the title Rewrite tests to check both TS/JS, and arrow/no arrow emit Fix arrow expressions in conditional expressions, take N+1 Jun 14, 2022
@jakebailey

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@typescript-bot

This comment was marked as outdated.

@jakebailey

This comment was marked as resolved.

@typescript-bot

This comment was marked as resolved.

@typescript-bot

This comment was marked as resolved.

@typescript-bot

This comment was marked as resolved.

@typescript-bot

This comment was marked as resolved.

@typescript-bot

This comment was marked as resolved.

@jakebailey

This comment was marked as resolved.

@typescript-bot

This comment was marked as resolved.

@weswigham
Copy link
Member

@typescript-bot test this
@typescript-bot user test this inline
@typescript-bot perf test this faster
@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 14, 2022

Heya @weswigham, I've started to run the extended test suite on this PR at 7ac56c3. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 14, 2022

Heya @weswigham, I've started to run the tarball bundle task on this PR at 7ac56c3. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 14, 2022

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 14, 2022

Heya @weswigham, I've started to run the diff-based user code test suite on this PR at 7ac56c3. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 14, 2022

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

@weswigham
Great news! no new errors were found between main..refs/pull/49531/merge

@typescript-bot
Copy link
Collaborator

Heya @weswigham, I've run the RWC suite on this PR - assuming you're on the TS core team, you can view the resulting diff here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 14, 2022

Hey @weswigham, 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/128080/artifacts?artifactName=tgz&fileId=30E2A902FA82282BB3FD9B24C7DF2067682BAAD64F3A0C9DB1F3B30652CB932302&fileName=/typescript-4.8.0-insiders.20220614.tgz"
    }
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/pr-build@4.8.0-pr-49531-22".;

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - main..49531

Metric main 49531 Delta Best Worst
Angular - node (v14.15.1, x64)
Memory used 333,876k (± 0.01%) 333,860k (± 0.01%) -16k (- 0.00%) 333,787k 333,923k
Parse Time 2.08s (± 0.68%) 2.08s (± 0.76%) -0.00s (- 0.19%) 2.05s 2.12s
Bind Time 0.89s (± 0.50%) 0.88s (± 0.51%) -0.01s (- 1.12%) 0.87s 0.89s
Check Time 5.74s (± 0.62%) 5.76s (± 0.51%) +0.02s (+ 0.30%) 5.71s 5.82s
Emit Time 6.41s (± 0.65%) 6.39s (± 0.59%) -0.01s (- 0.20%) 6.31s 6.47s
Total Time 15.12s (± 0.44%) 15.11s (± 0.37%) -0.01s (- 0.05%) 14.97s 15.26s
Compiler-Unions - node (v14.15.1, x64)
Memory used 192,598k (± 0.02%) 192,861k (± 0.41%) +262k (+ 0.14%) 191,635k 195,949k
Parse Time 0.85s (± 0.53%) 0.86s (± 0.69%) +0.01s (+ 0.94%) 0.85s 0.87s
Bind Time 0.58s (± 0.82%) 0.58s (± 0.85%) +0.00s (+ 0.34%) 0.58s 0.60s
Check Time 7.68s (± 0.63%) 7.63s (± 0.66%) -0.05s (- 0.60%) 7.55s 7.74s
Emit Time 2.53s (± 0.79%) 2.52s (± 1.20%) -0.01s (- 0.28%) 2.49s 2.63s
Total Time 11.63s (± 0.46%) 11.59s (± 0.64%) -0.04s (- 0.38%) 11.48s 11.81s
Monaco - node (v14.15.1, x64)
Memory used 325,586k (± 0.01%) 325,600k (± 0.01%) +14k (+ 0.00%) 325,559k 325,653k
Parse Time 1.57s (± 0.56%) 1.59s (± 0.70%) +0.02s (+ 1.34%) 1.57s 1.62s
Bind Time 0.78s (± 0.61%) 0.79s (± 0.47%) +0.01s (+ 1.53%) 0.79s 0.80s
Check Time 5.66s (± 0.38%) 5.70s (± 0.43%) +0.04s (+ 0.69%) 5.65s 5.75s
Emit Time 3.37s (± 0.65%) 3.35s (± 0.69%) -0.02s (- 0.53%) 3.30s 3.40s
Total Time 11.39s (± 0.31%) 11.44s (± 0.38%) +0.05s (+ 0.47%) 11.34s 11.55s
TFS - node (v14.15.1, x64)
Memory used 288,720k (± 0.01%) 288,739k (± 0.00%) +19k (+ 0.01%) 288,706k 288,763k
Parse Time 1.33s (± 0.75%) 1.35s (± 1.08%) +0.02s (+ 1.20%) 1.32s 1.38s
Bind Time 0.76s (± 0.92%) 0.75s (± 0.64%) -0.01s (- 1.58%) 0.74s 0.76s
Check Time 5.32s (± 0.56%) 5.32s (± 0.54%) +0.01s (+ 0.11%) 5.26s 5.39s
Emit Time 3.49s (± 1.18%) 3.61s (± 1.72%) +0.11s (+ 3.26%) 3.46s 3.69s
Total Time 10.90s (± 0.52%) 11.02s (± 0.68%) +0.12s (+ 1.11%) 10.80s 11.14s
material-ui - node (v14.15.1, x64)
Memory used 446,412k (± 0.01%) 446,303k (± 0.06%) -109k (- 0.02%) 445,263k 446,447k
Parse Time 1.90s (± 0.36%) 1.89s (± 0.47%) -0.01s (- 0.47%) 1.87s 1.91s
Bind Time 0.73s (± 1.20%) 0.73s (± 0.64%) -0.00s (- 0.41%) 0.72s 0.74s
Check Time 13.20s (± 0.80%) 13.06s (± 0.42%) -0.13s (- 1.01%) 12.93s 13.22s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.83s (± 0.70%) 15.68s (± 0.31%) -0.15s (- 0.94%) 15.57s 15.82s
xstate - node (v14.15.1, x64)
Memory used 537,430k (± 0.00%) 537,498k (± 0.00%) +67k (+ 0.01%) 537,436k 537,547k
Parse Time 2.61s (± 0.95%) 2.60s (± 0.59%) -0.01s (- 0.54%) 2.57s 2.64s
Bind Time 1.15s (± 0.83%) 1.15s (± 1.33%) +0.00s (+ 0.09%) 1.12s 1.19s
Check Time 1.54s (± 0.69%) 1.54s (± 0.58%) -0.00s (- 0.07%) 1.52s 1.55s
Emit Time 0.07s (± 4.92%) 0.07s (± 4.13%) -0.00s (- 2.70%) 0.07s 0.08s
Total Time 5.36s (± 0.48%) 5.35s (± 0.34%) -0.01s (- 0.19%) 5.32s 5.40s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory1 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)
  • xstate - node (v14.15.1, x64)
Benchmark Name Iterations
Current 49531 10
Baseline main 10

Developer Information:

Download Benchmark

@jakebailey jakebailey requested review from amcasey and sandersn June 17, 2022 17:09
@jakebailey
Copy link
Member Author

@typescript-bot run dt

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 17, 2022

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

@DanielRosenwasser
Copy link
Member

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

@typescript-bot
Copy link
Collaborator

Heya @DanielRosenwasser, I'm starting to run the extended test suite on this PR at 8675dc1. Hold tight - I'll update this comment with the log link once the build has been queued.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 17, 2022

Heya @DanielRosenwasser, I'm starting to run the perf test suite on this PR at 8675dc1. Hold tight - I'll update this comment with the log link once the build has been queued.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

Heya @DanielRosenwasser, I'm starting to run the diff-based user code test suite on this PR at 8675dc1. Hold tight - I'll update this comment with the log link once the build has been queued.

@typescript-bot
Copy link
Collaborator

Heya @DanielRosenwasser, I'm starting to run the tarball bundle task on this PR at 8675dc1. Hold tight - I'll update this comment with the log link once the build has been queued.

@typescript-bot
Copy link
Collaborator

Heya @DanielRosenwasser, I'm starting to run the abridged perf test suite on this PR at 8675dc1. Hold tight - I'll update this comment with the log link once the build has been queued.

@typescript-bot
Copy link
Collaborator

Heya @DanielRosenwasser, I'm starting to run the parallelized Definitely Typed test suite on this PR at 8675dc1. Hold tight - I'll update this comment with the log link once the build has been queued.

colonToken = parseExpectedToken(SyntaxKind.ColonToken),
nodeIsPresent(colonToken)
? parseAssignmentExpressionOrHigher()
? parseAssignmentExpressionOrHigher(allowReturnTypeInArrowFunction)
Copy link
Member

@DanielRosenwasser DanielRosenwasser Jun 17, 2022

Choose a reason for hiding this comment

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

We had a discussion over at #49531 (comment) about whether or we should have consistency between the true/false branches, or whether backwards compatibility should win and we propagate outer context for the false case.

In other words, should the following continue to parse?

a ? b : (c): Type => c

While we can propagate the flag here, having the two branches differ is confusing, and could make naive refactorings fail. I have a soft vote for disallowing in conditional types, but explicitly document it.

What do you think @ahejlsberg @sandersn?

Copy link
Member Author

Choose a reason for hiding this comment

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

I am pro-backwards-compatibility; this was an oversight in that I had it this way in a previous change, but while working on one of the newer examples from the wild, I switched it back until I found the "real" fix as the token === ":" check in the arrow function parsing function.

Copy link
Member Author

Choose a reason for hiding this comment

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

The relevant test case is e76fe4c (#49531), which I fixed in 8675dc1 (#49531) before I had a test case.

@@ -1,8 +0,0 @@
//// [parserArrowFunctionExpression10.ts]
Copy link
Member

Choose a reason for hiding this comment

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

Ugh, this is a rename, not a deletion.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, that's why I wanted to have my first commit be only test changes, so the following commits were clear as to what changed.

@typescript-bot
Copy link
Collaborator

Heya @DanielRosenwasser, I've run the RWC suite on this PR - assuming you're on the TS core team, you can view the resulting diff here.



==== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/fileJs.js (7 errors) ====
a() ? (b: number, c?: string): void => d() : e; // Not legal JS; "Unexpected token ':'" at first colon
Copy link
Member

@DanielRosenwasser DanielRosenwasser Jun 17, 2022

Choose a reason for hiding this comment

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

Is this comment supposed to reflect an example runtime's error?

Copy link
Member Author

@jakebailey jakebailey Jun 17, 2022

Choose a reason for hiding this comment

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

Yes, that's the parser error I get from node or a browser. I can drop these if they are confusing, I only had them in there to convince myself and reviewers that in every case, the only ones with TS-y meanings were ones that were not valid JavaScript.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 17, 2022

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/128426/artifacts?artifactName=tgz&fileId=639B538382E62B1E7A355CC96EA3165EB6F315ACCD9A790BD57A920EF3564C7302&fileName=/typescript-4.8.0-insiders.20220617.tgz"
    }
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/pr-build@4.8.0-pr-49531-35".;

@jakebailey
Copy link
Member Author

RWC and DT look good, perf is fine as well. Going to merge this to get this in for the beta.

@jakebailey jakebailey merged commit d7e58c8 into microsoft:main Jun 17, 2022
@jakebailey jakebailey deleted the arrow-function-cond-expression branch June 17, 2022 23:34
@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - main..49531

Metric main 49531 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 359,549k (± 0.02%) 359,519k (± 0.02%) -30k (- 0.01%) 359,357k 359,626k
Parse Time 2.12s (± 0.69%) 2.11s (± 0.74%) -0.01s (- 0.33%) 2.08s 2.14s
Bind Time 0.91s (± 0.91%) 0.90s (± 1.00%) -0.01s (- 1.21%) 0.88s 0.91s
Check Time 5.98s (± 0.55%) 5.95s (± 0.32%) -0.04s (- 0.60%) 5.91s 6.00s
Emit Time 6.17s (± 0.78%) 6.12s (± 0.88%) -0.05s (- 0.83%) 6.03s 6.26s
Total Time 15.17s (± 0.51%) 15.06s (± 0.40%) -0.11s (- 0.71%) 14.93s 15.24s
Compiler-Unions - node (v10.16.3, x64)
Memory used 206,438k (± 0.05%) 206,414k (± 0.03%) -24k (- 0.01%) 206,297k 206,577k
Parse Time 0.84s (± 0.90%) 0.84s (± 0.62%) -0.01s (- 0.59%) 0.83s 0.85s
Bind Time 0.53s (± 1.87%) 0.52s (± 0.69%) -0.00s (- 0.76%) 0.52s 0.53s
Check Time 8.15s (± 0.63%) 8.11s (± 0.58%) -0.04s (- 0.50%) 7.97s 8.19s
Emit Time 2.52s (± 0.86%) 2.51s (± 1.00%) -0.01s (- 0.52%) 2.46s 2.59s
Total Time 12.04s (± 0.53%) 11.98s (± 0.38%) -0.06s (- 0.47%) 11.90s 12.09s
Monaco - node (v10.16.3, x64)
Memory used 343,816k (± 0.01%) 343,860k (± 0.01%) +44k (+ 0.01%) 343,788k 343,937k
Parse Time 1.60s (± 0.51%) 1.59s (± 0.51%) -0.01s (- 0.62%) 1.58s 1.62s
Bind Time 0.77s (± 0.52%) 0.78s (± 1.07%) +0.00s (+ 0.52%) 0.76s 0.79s
Check Time 5.99s (± 0.24%) 5.96s (± 0.73%) -0.03s (- 0.53%) 5.82s 6.04s
Emit Time 3.27s (± 0.87%) 3.26s (± 0.65%) -0.00s (- 0.09%) 3.23s 3.33s
Total Time 11.63s (± 0.38%) 11.59s (± 0.48%) -0.04s (- 0.32%) 11.45s 11.74s
TFS - node (v10.16.3, x64)
Memory used 305,139k (± 0.02%) 305,147k (± 0.02%) +8k (+ 0.00%) 304,975k 305,309k
Parse Time 1.30s (± 0.57%) 1.29s (± 0.50%) -0.01s (- 0.92%) 1.28s 1.30s
Bind Time 0.73s (± 0.79%) 0.73s (± 0.68%) -0.00s (- 0.55%) 0.72s 0.74s
Check Time 5.42s (± 0.62%) 5.39s (± 0.81%) -0.03s (- 0.46%) 5.31s 5.52s
Emit Time 3.41s (± 1.01%) 3.43s (± 1.02%) +0.02s (+ 0.62%) 3.35s 3.53s
Total Time 10.85s (± 0.56%) 10.83s (± 0.71%) -0.02s (- 0.19%) 10.71s 11.08s
material-ui - node (v10.16.3, x64)
Memory used 469,116k (± 0.02%) 469,081k (± 0.01%) -36k (- 0.01%) 468,980k 469,228k
Parse Time 1.85s (± 0.65%) 1.85s (± 0.83%) -0.00s (- 0.11%) 1.82s 1.89s
Bind Time 0.70s (± 0.97%) 0.69s (± 1.80%) -0.01s (- 1.56%) 0.67s 0.72s
Check Time 14.61s (± 0.86%) 14.55s (± 0.80%) -0.06s (- 0.38%) 14.31s 14.82s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 17.17s (± 0.76%) 17.10s (± 0.72%) -0.07s (- 0.41%) 16.84s 17.38s
xstate - node (v10.16.3, x64)
Memory used 580,948k (± 1.25%) 577,722k (± 0.01%) -3,226k (- 0.56%) 577,530k 577,855k
Parse Time 2.63s (± 0.28%) 2.62s (± 0.42%) -0.01s (- 0.34%) 2.59s 2.64s
Bind Time 1.04s (± 0.91%) 1.04s (± 0.55%) -0.00s (- 0.38%) 1.03s 1.05s
Check Time 1.55s (± 0.69%) 1.53s (± 0.54%) -0.01s (- 0.90%) 1.52s 1.56s
Emit Time 0.07s (± 0.00%) 0.07s (± 0.00%) 0.00s ( 0.00%) 0.07s 0.07s
Total Time 5.29s (± 0.40%) 5.27s (± 0.20%) -0.02s (- 0.38%) 5.25s 5.30s
Angular - node (v12.1.0, x64)
Memory used 337,212k (± 0.02%) 337,203k (± 0.01%) -8k (- 0.00%) 337,168k 337,266k
Parse Time 2.11s (± 0.61%) 2.10s (± 0.76%) -0.00s (- 0.14%) 2.07s 2.14s
Bind Time 0.86s (± 0.65%) 0.86s (± 1.12%) +0.00s (+ 0.35%) 0.85s 0.89s
Check Time 5.77s (± 0.77%) 5.75s (± 0.28%) -0.02s (- 0.33%) 5.72s 5.79s
Emit Time 6.36s (± 0.61%) 6.36s (± 0.56%) -0.01s (- 0.13%) 6.28s 6.44s
Total Time 15.10s (± 0.52%) 15.06s (± 0.34%) -0.03s (- 0.21%) 14.98s 15.20s
Compiler-Unions - node (v12.1.0, x64)
Memory used 194,131k (± 0.03%) 193,920k (± 0.15%) -211k (- 0.11%) 193,193k 194,352k
Parse Time 0.83s (± 1.08%) 0.84s (± 1.26%) +0.01s (+ 1.33%) 0.82s 0.86s
Bind Time 0.55s (± 1.12%) 0.55s (± 1.10%) -0.01s (- 1.09%) 0.53s 0.56s
Check Time 7.66s (± 0.48%) 7.55s (± 0.52%) -0.11s (- 1.40%) 7.48s 7.66s
Emit Time 2.52s (± 0.84%) 2.52s (± 0.96%) +0.00s (+ 0.08%) 2.47s 2.57s
Total Time 11.55s (± 0.34%) 11.45s (± 0.38%) -0.10s (- 0.88%) 11.36s 11.55s
Monaco - node (v12.1.0, x64)
Memory used 326,891k (± 0.02%) 326,816k (± 0.02%) -76k (- 0.02%) 326,714k 326,969k
Parse Time 1.58s (± 0.80%) 1.58s (± 1.03%) +0.01s (+ 0.63%) 1.55s 1.62s
Bind Time 0.76s (± 0.99%) 0.76s (± 0.45%) -0.01s (- 0.92%) 0.75s 0.76s
Check Time 5.81s (± 0.29%) 5.77s (± 0.35%) -0.04s (- 0.72%) 5.73s 5.81s
Emit Time 3.34s (± 0.92%) 3.29s (± 0.91%) -0.04s (- 1.32%) 3.24s 3.38s
Total Time 11.48s (± 0.31%) 11.40s (± 0.32%) -0.08s (- 0.71%) 11.34s 11.51s
TFS - node (v12.1.0, x64)
Memory used 289,726k (± 0.02%) 289,777k (± 0.03%) +51k (+ 0.02%) 289,618k 289,994k
Parse Time 1.31s (± 0.45%) 1.31s (± 0.81%) 0.00s ( 0.00%) 1.29s 1.34s
Bind Time 0.77s (± 1.17%) 0.73s (± 1.50%) 🟩-0.04s (- 4.84%) 0.72s 0.77s
Check Time 5.34s (± 0.59%) 5.34s (± 0.48%) +0.00s (+ 0.04%) 5.30s 5.42s
Emit Time 3.51s (± 1.05%) 3.51s (± 1.28%) -0.00s (- 0.03%) 3.45s 3.63s
Total Time 10.92s (± 0.49%) 10.89s (± 0.46%) -0.03s (- 0.29%) 10.80s 10.98s
material-ui - node (v12.1.0, x64)
Memory used 448,056k (± 0.06%) 448,026k (± 0.07%) -30k (- 0.01%) 446,881k 448,349k
Parse Time 1.86s (± 0.56%) 1.84s (± 0.41%) -0.01s (- 0.75%) 1.83s 1.86s
Bind Time 0.68s (± 0.73%) 0.68s (± 1.07%) -0.00s (- 0.44%) 0.67s 0.70s
Check Time 13.09s (± 0.95%) 13.06s (± 1.01%) -0.03s (- 0.21%) 12.77s 13.40s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.63s (± 0.82%) 15.59s (± 0.83%) -0.04s (- 0.25%) 15.29s 15.91s
xstate - node (v12.1.0, x64)
Memory used 543,243k (± 0.02%) 546,509k (± 1.30%) +3,266k (+ 0.60%) 543,100k 575,246k
Parse Time 2.58s (± 0.58%) 2.57s (± 0.61%) -0.02s (- 0.58%) 2.55s 2.62s
Bind Time 1.03s (± 1.16%) 1.04s (± 0.62%) +0.00s (+ 0.48%) 1.02s 1.05s
Check Time 1.50s (± 0.64%) 1.48s (± 0.59%) -0.02s (- 1.00%) 1.46s 1.50s
Emit Time 0.07s (± 0.00%) 0.07s (± 0.00%) 0.00s ( 0.00%) 0.07s 0.07s
Total Time 5.19s (± 0.42%) 5.16s (± 0.32%) -0.03s (- 0.58%) 5.13s 5.19s
Angular - node (v14.15.1, x64)
Memory used 335,253k (± 0.01%) 335,310k (± 0.01%) +57k (+ 0.02%) 335,270k 335,340k
Parse Time 2.08s (± 0.68%) 2.08s (± 0.36%) +0.00s (+ 0.24%) 2.07s 2.10s
Bind Time 0.91s (± 1.02%) 0.91s (± 0.66%) -0.00s (- 0.33%) 0.89s 0.92s
Check Time 5.77s (± 0.52%) 5.73s (± 0.61%) -0.04s (- 0.76%) 5.65s 5.80s
Emit Time 6.47s (± 0.71%) 6.40s (± 0.82%) -0.07s (- 1.11%) 6.33s 6.58s
Total Time 15.23s (± 0.49%) 15.12s (± 0.51%) -0.11s (- 0.75%) 14.97s 15.29s
Compiler-Unions - node (v14.15.1, x64)
Memory used 192,642k (± 0.01%) 192,555k (± 0.11%) -88k (- 0.05%) 191,682k 192,688k
Parse Time 0.84s (± 0.53%) 0.85s (± 0.96%) +0.01s (+ 0.95%) 0.84s 0.87s
Bind Time 0.58s (± 0.95%) 0.57s (± 1.04%) -0.01s (- 1.20%) 0.56s 0.59s
Check Time 7.70s (± 0.49%) 7.66s (± 0.72%) -0.04s (- 0.58%) 7.57s 7.82s
Emit Time 2.53s (± 0.77%) 2.56s (± 1.36%) +0.03s (+ 1.23%) 2.50s 2.66s
Total Time 11.66s (± 0.40%) 11.64s (± 0.61%) -0.02s (- 0.13%) 11.53s 11.84s
Monaco - node (v14.15.1, x64)
Memory used 325,597k (± 0.01%) 325,605k (± 0.00%) +8k (+ 0.00%) 325,580k 325,646k
Parse Time 1.58s (± 0.42%) 1.57s (± 0.57%) -0.00s (- 0.19%) 1.56s 1.59s
Bind Time 0.79s (± 0.59%) 0.80s (± 1.03%) +0.01s (+ 0.89%) 0.78s 0.82s
Check Time 5.68s (± 0.37%) 5.69s (± 0.58%) +0.01s (+ 0.16%) 5.63s 5.78s
Emit Time 3.40s (± 1.04%) 3.35s (± 0.54%) -0.05s (- 1.50%) 3.31s 3.40s
Total Time 11.45s (± 0.45%) 11.41s (± 0.45%) -0.04s (- 0.36%) 11.34s 11.57s
TFS - node (v14.15.1, x64)
Memory used 288,764k (± 0.01%) 288,730k (± 0.01%) -34k (- 0.01%) 288,632k 288,796k
Parse Time 1.33s (± 1.54%) 1.32s (± 1.15%) -0.00s (- 0.38%) 1.30s 1.36s
Bind Time 0.76s (± 0.96%) 0.75s (± 1.06%) -0.01s (- 0.79%) 0.73s 0.77s
Check Time 5.33s (± 0.25%) 5.32s (± 0.83%) -0.00s (- 0.08%) 5.25s 5.41s
Emit Time 3.64s (± 1.99%) 3.60s (± 2.39%) -0.03s (- 0.91%) 3.41s 3.73s
Total Time 11.05s (± 0.65%) 11.00s (± 1.08%) -0.05s (- 0.48%) 10.76s 11.19s
material-ui - node (v14.15.1, x64)
Memory used 446,374k (± 0.00%) 446,384k (± 0.00%) +10k (+ 0.00%) 446,350k 446,428k
Parse Time 1.90s (± 0.56%) 1.89s (± 0.70%) -0.01s (- 0.58%) 1.87s 1.93s
Bind Time 0.73s (± 1.64%) 0.72s (± 1.38%) -0.01s (- 1.50%) 0.70s 0.74s
Check Time 13.22s (± 0.40%) 13.18s (± 0.76%) -0.04s (- 0.32%) 12.92s 13.37s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.86s (± 0.31%) 15.79s (± 0.63%) -0.06s (- 0.40%) 15.53s 15.98s
xstate - node (v14.15.1, x64)
Memory used 540,944k (± 0.00%) 540,997k (± 0.01%) +53k (+ 0.01%) 540,931k 541,062k
Parse Time 2.61s (± 0.36%) 2.63s (± 0.70%) +0.01s (+ 0.50%) 2.59s 2.69s
Bind Time 1.19s (± 1.31%) 1.17s (± 1.30%) -0.02s (- 1.68%) 1.15s 1.22s
Check Time 1.54s (± 0.38%) 1.53s (± 0.62%) -0.01s (- 0.58%) 1.52s 1.55s
Emit Time 0.07s (± 0.00%) 0.07s (± 4.66%) +0.00s (+ 4.29%) 0.07s 0.08s
Total Time 5.42s (± 0.34%) 5.40s (± 0.53%) -0.01s (- 0.20%) 5.36s 5.46s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-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 (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)
  • xstate - node (v10.16.3, x64)
  • xstate - node (v12.1.0, x64)
  • xstate - node (v14.15.1, x64)
Benchmark Name Iterations
Current 49531 10
Baseline main 10

Developer Information:

Download Benchmark

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.

[bug] Ternary + arrow function is not correctly parsed
5 participants