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

gh-103285: Rewrite _splitlines_no_ff to improve performance #103307

Merged
merged 5 commits into from
Apr 24, 2023

Conversation

gaogaotiantian
Copy link
Member

@gaogaotiantian gaogaotiantian commented Apr 6, 2023

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

Thank you!

@gaogaotiantian
Copy link
Member Author

@isidentical hi could you take a look at the change when you have some time? Thanks!

@isidentical
Copy link
Member

This was something I complained a lot in the past, thanks for taking a stab at it.

@gaogaotiantian
Copy link
Member Author

No problem :) Let me know if you need me to change anything.

Lib/ast.py Show resolved Hide resolved
Lib/ast.py Outdated Show resolved Hide resolved
Lib/ast.py Outdated Show resolved Hide resolved
Lib/ast.py Outdated Show resolved Hide resolved
gaogaotiantian and others added 4 commits April 18, 2023 14:05
@gaogaotiantian gaogaotiantian force-pushed the ast-sourcefile-optimization branch from 6e7e73a to 14a73a5 Compare April 18, 2023 21:15
Lib/ast.py Show resolved Hide resolved
Copy link
Member

@isidentical isidentical left a comment

Choose a reason for hiding this comment

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

Looks great, tested a bunch of scenarios involving consecutive \rs etc. and seems to imitate the behavior of the old implementation exactly. With the additional tests, this should be good to go!

@gaogaotiantian
Copy link
Member Author

Do we need the approval from @sobolevn for auto merge to take effect?

@gaogaotiantian
Copy link
Member Author

Oh, it seems like automerge is no longer working - #103739

Copy link
Contributor

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Thank you, this looks great!

@hauntsaninja hauntsaninja merged commit 3686013 into python:main Apr 24, 2023
@gaogaotiantian gaogaotiantian deleted the ast-sourcefile-optimization branch April 24, 2023 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance or resource usage stdlib Python modules in the Lib dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants