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

Parsing performance #82

Merged
merged 1 commit into from
Feb 25, 2022
Merged

Parsing performance #82

merged 1 commit into from
Feb 25, 2022

Conversation

DocKDE
Copy link
Collaborator

@DocKDE DocKDE commented Feb 25, 2022

In chain.rs the residues are now iterated over in reverse order so the loop will be broken out of earlier. This leads to a significant performance gain during parsing.
Also some clippy lints
#81

… of new atoms to chain due to performance reasons
@DocKDE DocKDE mentioned this pull request Feb 25, 2022
Copy link
Owner

@douweschulte douweschulte left a comment

Choose a reason for hiding this comment

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

Nice work! I have also been busy profiling this whole day. I found exactly the same culprit and also do not really know how to speed up the comparison, besides comparing less by using the reverse iterator.
Besides the and_then looks fancy!

@DocKDE
Copy link
Collaborator Author

DocKDE commented Feb 25, 2022

That was basically just an automatic clippy lint, I use those during my coding. I just updated to 1.59, possibly that got added there.
Maybe I can come up with an idea how to reduce the number of necessary comparisons further, who knows...

@douweschulte
Copy link
Owner

Ahh 1.59 just launched that explains ;-)

@douweschulte douweschulte merged commit 60d98ca into douweschulte:master Feb 25, 2022
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