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

Python multiprocessing make re2 deterioration to native re #508

Open
Honesty-of-the-Cavernous-Tissue opened this issue Aug 22, 2024 · 1 comment

Comments

@Honesty-of-the-Cavernous-Tissue

Thanks for your great work !

i wonder if re2 takes some extra cpu resource consume

in my project, i tested a single file of text processing for native re & re2 (with just only regex part different)
re2 is obvious faster

but when i used multiprocessing to process a group of data, with whole cpu resource usage, re2 was deterioration to native re

@rsc
Copy link
Contributor

rsc commented Sep 4, 2024

A concrete demonstration example that people can run would help here. In general RE2 works fine across multiple threads. Perhaps Python does not work as well with multiple threads.

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

No branches or pull requests

2 participants