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

Fix performance regression of AST traversal #493

Merged
merged 7 commits into from
Feb 2, 2021
Merged

Conversation

fpoli
Copy link
Member

@fpoli fpoli commented Jan 20, 2021

@mschwerhoff this makes the program that you sent me verify in 1m 30s.

The remaining slowdown are the allocations performed in the iterator method, which put pressure on the GC.

Update

I added a minimal Traversable trait to keep using the old (i.e. before 1df0f34) interface and implementation, which does not incur allocation costs.

@fpoli fpoli changed the title Optimize quadratic => linear time complexity when iterating over AST nodes Fix performance regression of AST traversal Feb 1, 2021
@fpoli
Copy link
Member Author

fpoli commented Feb 1, 2021

Malte's program now verifies in 20 seconds, as it used to be. The PR is ready to be merged.

@mschwerhoff
Copy link
Contributor

Malte's program now verifies in 20 seconds, as it used to be. The PR is ready to be merged.

That is great news, thank you. Looks ready to me as well.

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.

2 participants