Skip to content
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

Refactor step 2: replace Node traversal with ast.NodeVisitor #93

Closed
wants to merge 67 commits into from

Conversation

cgahr
Copy link
Collaborator

@cgahr cgahr commented May 1, 2023

depends on #91
see #92 for discussion.

Constantin Gahr added 30 commits April 25, 2023 09:14
@cgahr cgahr force-pushed the refactor-step-2 branch from f74a38f to a1ababe Compare May 1, 2023 18:29
Copy link
Owner

@bwhmather bwhmather left a comment

Choose a reason for hiding this comment

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

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.

@jgberry
Copy link
Collaborator

jgberry commented May 3, 2023

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.

@cgahr
Copy link
Collaborator Author

cgahr commented May 5, 2023

I see that now.

I did some performance profiling too and found similar results..

@cgahr cgahr closed this May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants