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: Using cache for str.contains regex compilation #11183

Merged
merged 1 commit into from
Sep 19, 2023

Conversation

reswqa
Copy link
Collaborator

@reswqa reswqa commented Sep 18, 2023

per comment(#11141 (comment)).

@github-actions github-actions bot added performance Performance issues or improvements python Related to Python Polars rust Related to Rust Polars labels Sep 18, 2023
@reswqa reswqa marked this pull request as ready for review September 19, 2023 01:51
@ritchie46
Copy link
Member

Great! 🙌

@ritchie46 ritchie46 merged commit 34a4c90 into pola-rs:main Sep 19, 2023
19 checks passed
@jonashaag
Copy link
Contributor

Does this fix #8052?

@reswqa
Copy link
Collaborator Author

reswqa commented Sep 19, 2023

Does this fix #8052?

I haven't completely read all the conversations in that issue. What this PR does is:
If the pattern is an Expr(will produce a column of pattern series), we will cache the compiled pattern. That is to say, there will be significant benefits for duplicate patterns.

But for list.eval, it needs to perform operation over each sub-list. IIUC, cache cannot share between them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance issues or improvements python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants