Refactor step 2: replace Node traversal with ast.NodeVisitor#93
Closed
cgahr wants to merge 67 commits intobwhmather:masterfrom
Closed
Refactor step 2: replace Node traversal with ast.NodeVisitor#93cgahr wants to merge 67 commits intobwhmather:masterfrom
cgahr wants to merge 67 commits intobwhmather:masterfrom
Conversation
added 30 commits
April 25, 2023 09:14
…all valid python files
…oml beyond the specified test-folder
….files()" This reverts commit 193af08.
added 25 commits
May 1, 2023 08:36
bwhmather
reviewed
May 3, 2023
Owner
There was a problem hiding this comment.
I think this is a no from me.
ast.NodeVisitor has always inexplicably awful performance. I think @jgberry benchmarked a 20% overall increase in runtime over my original @singledispatch implementation, and the current custom dispatch implementation is another 10% to 15% better than that one.
Dispatching based on name is also just less clean than dispatching based on type.
Collaborator
|
Yep, see #42 for the performance related discussion. This was a decision we consciously made. Whether it was the right decision, perhaps that can be revisited. There are tradeoffs on either side. |
Collaborator
Author
|
I see that now. I did some performance profiling too and found similar results.. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
depends on #91
see #92 for discussion.