-
Notifications
You must be signed in to change notification settings - Fork 447
[Perf] Improve SyntaxRewriter visitation performance #2726
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
6be8e8d
[SyntaxRewriter] Optimize SyntaxRewriter visitation
rintaro b6898d1
[SyntaxRewriter] Introduce SyntaxNodeFactory
rintaro e664473
[SyntaxRewriter] Improve new layout node creation
rintaro e2d4423
[SyntaxRewriter] Make 'visitChildren()' a non-generic mehod
rintaro b67e899
[SyntaxRewriter] Iterate RawSyntaxChildren using pattern matching
rintaro 7298fe8
[SyntaxVisitor] Adopt SyntaxNodeFactory
rintaro ef8bb05
[SyntaxRewriter] Return the node as-is
rintaro ec96b4d
[CMake] Split 'touch' workaround into two commands
rintaro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[SyntaxRewriter] Iterate RawSyntaxChildren using pattern matching
Simpify the iteration code. Also, stop counting 'childIndex' as it can be retrieved from the absolute info.
- Loading branch information
commit b67e89984b149acf1612c2d2c8d97921eea597a2
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
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.
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.
What are the performance characteristics of
ContiguousArray
vsArray
here? I would expectArray
to be faster because it doesn’t need to move all elements if it runs out of space. And I don’t think we need the contiguous property here anymore.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.
Hm, I haven't tried
Array
here. interesting.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.
Array always uses contiguous storage unless it's backed by
NSArray
.Although there's no particular reason to use
ContiguousArray
, its implementation is simpler thanArray
. So let's keep this as-is