-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
perf(es/lexer): Use jump table for read_token
#7058
Merged
Merged
+265
−169
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
Performance:
|
kdy1
commented
Mar 11, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
swc-bump:
- swc_ecma_parser
Noted with thanks
…On Sat, Mar 11, 2023, 5:09 AM kdy1 ***@***.***> wrote:
*Description:*
------------------------------
You can view, comment on, or merge this pull request online at:
#7058
Commit Summary
- 2a4a390
<2a4a390>
Add table.rs
- b6a67b5
<b6a67b5>
More table
- 528344e
<528344e>
More
- 48b3bd7
<48b3bd7>
Unicode
- a1092c8
<a1092c8>
Error
- f871e8b
<f871e8b>
More
- 337b634
<337b634>
IDT
- 3fe7b64
<3fe7b64>
More
- 2b01bbb
<2b01bbb>
More
- 803220c
<803220c>
More
- 0a3345e
<0a3345e>
More
- f3ae7b7
<f3ae7b7>
^
- a7071b4
<a7071b4>
Refactor
- 1648622
<1648622>
Refactor: `read_token_bang_or_eq`
- a37073e
<a37073e>
More table work
- 9140d25
<9140d25>
More table work
- 057d3f6
<057d3f6>
More table work
- 5babd45
<5babd45>
More table work
- cd99346
<cd99346>
Table work is done
- b0b30e6
<b0b30e6>
Fix lexer
- dca6944
<dca6944>
Fix table
- c1a7852
<c1a7852>
Use table
- 32794e8
<32794e8>
Fix table for `@`
File Changes
(2 files <https://github.com/swc-project/swc/pull/7058/files>)
- *M* crates/swc_ecma_parser/src/lexer/mod.rs
<https://github.com/swc-project/swc/pull/7058/files#diff-6402bc52db5ddbd503b09a01f2ab9ec09c93953a43f40d641aa0edfa83f0cf08>
(254)
- *A* crates/swc_ecma_parser/src/lexer/table.rs
<https://github.com/swc-project/swc/pull/7058/files#diff-2b4b8a57576cff5f77307802f5134dd5bd022515882a796173a9318c8ee7a17f>
(175)
Patch Links:
- https://github.com/swc-project/swc/pull/7058.patch
- https://github.com/swc-project/swc/pull/7058.diff
—
Reply to this email directly, view it on GitHub
<#7058>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A6GG5XM6OI5RNFTYAYS5EDLW3RMPJANCNFSM6AAAAAAVXNRBEA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
strager
reviewed
Mar 12, 2023
match c { | ||
None => {} | ||
Some(c) => { | ||
match c { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious: Why didn't the Rust compiler make a switch table for this match
?
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.
Description: