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

Avoid removing elements from the head of a vec #69

Merged
merged 1 commit into from
May 25, 2023

Conversation

MichaReiser
Copy link
Contributor

@MichaReiser MichaReiser commented May 25, 2023

This changes the parsing of ExpressionStatement to use pop with an IntoIterator instead of removing elements from the beginning of the vec. Removing elements from the beginning involves moving all following elements by one offset.

I don't expect this to improve performance significantly because it's rare that values contains more than a few elements.

@MichaReiser MichaReiser marked this pull request as ready for review May 25, 2023 10:34
Copy link
Member

@youknowone youknowone left a comment

Choose a reason for hiding this comment

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

👍

@youknowone youknowone merged commit 5493c9f into RustPython:main May 25, 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.

2 participants