This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 659
perf(rowan): Speedup next_token
and prev_token
implementations
#2612
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hand write the traversal of `next_token` and `prev_token` to speedup the traversal. The new comment formatting will make heavy use of these two methods which is why it's important that they are fast. ``` ❯ critcmp main fused group PR main ----- ----- ---- formatter/checker.ts 1.00 239.2±1.22ms 10.9 MB/sec 1.01 240.8±3.49ms 10.8 MB/sec formatter/compiler.js 1.00 139.6±3.00ms 7.5 MB/sec 1.04 145.4±1.99ms 7.2 MB/sec formatter/d3.min.js 1.00 104.7±1.04ms 2.5 MB/sec 1.04 108.9±2.69ms 2.4 MB/sec formatter/dojo.js 1.00 7.8±0.11ms 8.8 MB/sec 1.02 7.9±0.01ms 8.6 MB/sec formatter/ios.d.ts 1.00 189.0±3.27ms 9.9 MB/sec 1.01 190.0±1.41ms 9.8 MB/sec formatter/jquery.min.js 1.00 29.5±0.43ms 2.8 MB/sec 1.00 29.4±0.23ms 2.8 MB/sec formatter/math.js 1.00 225.6±0.95ms 2.9 MB/sec 1.04 235.4±4.01ms 2.8 MB/sec formatter/parser.ts 1.02 5.6±0.01ms 8.7 MB/sec 1.00 5.5±0.09ms 8.8 MB/sec formatter/pixi.min.js 1.00 120.9±1.96ms 3.6 MB/sec 1.12 135.3±19.62ms 3.2 MB/sec formatter/react-dom.production.min.js 1.00 35.4±0.54ms 3.2 MB/sec 1.05 37.3±0.39ms 3.1 MB/sec formatter/react.production.min.js 1.00 1815.8±3.00µs 3.4 MB/sec 1.01 1833.6±29.27µs 3.4 MB/sec formatter/router.ts 1.01 4.1±0.01ms 14.8 MB/sec 1.00 4.1±0.08ms 15.0 MB/sec formatter/tex-chtml-full.js 1.00 285.8±1.28ms 3.2 MB/sec 1.04 297.2±1.77ms 3.1 MB/sec formatter/three.min.js 1.00 142.0±1.02ms 4.1 MB/sec 1.05 148.7±4.29ms 3.9 MB/sec formatter/typescript.js 1.00 957.2±94.68ms 9.9 MB/sec 1.01 967.2±20.72ms 9.8 MB/sec formatter/vue.global.prod.js 1.00 47.7±0.19ms 2.5 MB/sec 1.02 48.7±0.39ms 2.5 MB/sec ```
MichaReiser
force-pushed
the
perf/next-prev-token
branch
from
May 25, 2022 08:35
ca5c492
to
f9fce38
Compare
!bench_formatter |
Deploying with Cloudflare Pages
|
leops
approved these changes
May 25, 2022
Formatter Benchmark Results
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Hand write the traversal of
next_token
andprev_token
to speedup the traversal.The new comment formatting will make heavy use of these two methods which is why it's important that they are fast.