Skip to content

Fix performance regression of AST traversal#493

Merged
fpoli merged 7 commits into
masterfrom
optimize-iterator
Feb 2, 2021
Merged

Fix performance regression of AST traversal#493
fpoli merged 7 commits into
masterfrom
optimize-iterator

Conversation

@fpoli

@fpoli fpoli commented Jan 20, 2021

Copy link
Copy Markdown
Member

@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 force-pushed the optimize-iterator branch from 1f588a7 to 7bf9201 Compare February 1, 2021 09:59
@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

fpoli commented Feb 1, 2021

Copy link
Copy Markdown
Member Author

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

@mschwerhoff

Copy link
Copy Markdown
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.

@fpoli fpoli force-pushed the optimize-iterator branch from 61ffb7a to 928cd15 Compare February 2, 2021 09:52
@fpoli fpoli merged commit e3c3e88 into master Feb 2, 2021
@fpoli fpoli deleted the optimize-iterator branch February 2, 2021 10:00
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