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

perf: only iter on found escape sequences #304

Merged
merged 1 commit into from
Jul 27, 2023

Conversation

yajo
Copy link
Contributor

@yajo yajo commented Jul 26, 2023

Finding used sequences is much faster than iterating over each one of them for each character.

The iteration is still used, but at least it will only be used once per any sequence that is actually used in the string.

Most strings won't include any sequences and will just be fast.

@moduon MT-1075

Finding used sequences is much faster than iterating over each one of them for each character.

The iteration is still used, but at least it will only be used once per any sequence that is actually used in the string.

Most strings won't include any sequences and will just be fast.

@moduon MT-1075
@frostming frostming merged commit 9e39a63 into python-poetry:master Jul 27, 2023
@yajo yajo deleted the escape-string-faster branch September 12, 2023 10:27
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