+
Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

refactor(rome_rowan): Remove Clone requirement from trivia mutation methods #3030

Merged
merged 2 commits into from
Aug 9, 2022

Conversation

MichaReiser
Copy link
Contributor

Remove the requirement for Clone on the trivia mutation methods by changing the
implementation so that it only iterates once over the new trivia rather than twice.

… methods

Remove the requirement for `Clone` on the trivia mutation methods by changing the
implementation so that it only iterates once over the new trivia rather than twice.
@MichaReiser MichaReiser requested review from leops and a team August 8, 2022 14:49
@MichaReiser MichaReiser temporarily deployed to aws August 8, 2022 14:49 Inactive
@MichaReiser
Copy link
Contributor Author

!bench_analyzer

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Aug 8, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 33eee4e
Status: ✅  Deploy successful!
Preview URL: https://95f5b304.tools-8rn.pages.dev
Branch Preview URL: https://refactor-rome-rowan-trivia-m.tools-8rn.pages.dev

View logs

@github-actions
Copy link

github-actions bot commented Aug 8, 2022

@github-actions
Copy link

github-actions bot commented Aug 8, 2022

Parser conformance results on ubuntu-latest

js/262

Test result main count This PR count Difference
Total 45878 45878 0
Passed 44938 44938 0
Failed 940 940 0
Panics 0 0 0
Coverage 97.95% 97.95% 0.00%

jsx/babel

Test result main count This PR count Difference
Total 39 39 0
Passed 36 36 0
Failed 3 3 0
Panics 0 0 0
Coverage 92.31% 92.31% 0.00%

symbols/microsoft

Test result main count This PR count Difference
Total 5946 5946 0
Passed 395 395 0
Failed 5551 5551 0
Panics 0 0 0
Coverage 6.64% 6.64% 0.00%

ts/babel

Test result main count This PR count Difference
Total 588 588 0
Passed 519 519 0
Failed 69 69 0
Panics 0 0 0
Coverage 88.27% 88.27% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 16257 16257 0
Passed 12397 12397 0
Failed 3860 3860 0
Panics 0 0 0
Coverage 76.26% 76.26% 0.00%

@github-actions
Copy link

github-actions bot commented Aug 8, 2022

Analyzer Benchmark Results

group                     main                                   pr
-----                     ----                                   --
analyzer/css.js           1.01      2.2±0.00ms     5.3 MB/sec    1.00      2.2±0.01ms     5.3 MB/sec
analyzer/index.js         1.01      6.0±0.01ms     5.4 MB/sec    1.00      5.9±0.14ms     5.5 MB/sec
analyzer/lint.ts          1.00      3.0±0.01ms    13.9 MB/sec    1.00      3.0±0.03ms    14.0 MB/sec
analyzer/parser.ts        1.01      7.3±0.19ms     6.6 MB/sec    1.00      7.2±0.05ms     6.7 MB/sec
analyzer/router.ts        1.01      5.1±0.01ms    11.9 MB/sec    1.00      5.1±0.01ms    12.0 MB/sec
analyzer/statement.ts     1.01      6.9±0.06ms     5.1 MB/sec    1.00      6.9±0.06ms     5.2 MB/sec
analyzer/typescript.ts    1.01     10.3±0.05ms     5.3 MB/sec    1.00     10.2±0.07ms     5.3 MB/sec


text.push_str(self.text_trimmed());
token_text.push_str(self.text_trimmed());
Copy link
Contributor

@xunilrj xunilrj Aug 9, 2022

Choose a reason for hiding this comment

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

You may be able to squeeze a lit bit more juice using self.raw.green().leading_trailing_total_len()directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I implemented this change by slicing the self.text() directly.

@MichaReiser MichaReiser temporarily deployed to aws August 9, 2022 15:14 Inactive
@MichaReiser
Copy link
Contributor Author

!bench_analyzer

@github-actions
Copy link

github-actions bot commented Aug 9, 2022

Analyzer Benchmark Results

group                     main                                   pr
-----                     ----                                   --
analyzer/css.js           1.01      2.2±0.00ms     5.4 MB/sec    1.00      2.1±0.02ms     5.4 MB/sec
analyzer/index.js         1.01      5.9±0.01ms     5.5 MB/sec    1.00      5.8±0.03ms     5.6 MB/sec
analyzer/lint.ts          1.00      3.0±0.02ms    13.9 MB/sec    1.01      3.0±0.01ms    13.8 MB/sec
analyzer/parser.ts        1.01      7.1±0.02ms     6.8 MB/sec    1.00      7.0±0.03ms     6.9 MB/sec
analyzer/router.ts        1.01      5.0±0.01ms    12.3 MB/sec    1.00      5.0±0.01ms    12.4 MB/sec
analyzer/statement.ts     1.00      6.8±0.03ms     5.2 MB/sec    1.00      6.8±0.04ms     5.2 MB/sec
analyzer/typescript.ts    1.01     10.2±0.11ms     5.3 MB/sec    1.00     10.2±0.07ms     5.4 MB/sec

@MichaReiser MichaReiser merged commit 8188ae0 into main Aug 9, 2022
@MichaReiser MichaReiser deleted the refactor/rome-rowan-trivia-mutation branch August 9, 2022 15:27
IWANABETHATGUY pushed a commit to IWANABETHATGUY/tools that referenced this pull request Aug 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载