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

Replace expansive regex with find #976

Merged
merged 3 commits into from
Dec 20, 2024
Merged

Replace expansive regex with find #976

merged 3 commits into from
Dec 20, 2024

Conversation

JasonMarechal25
Copy link
Contributor

std::regex is atrociously slow. We could replace it with another lib but in this case we don't really require the power of regex expressions and just need a regular string equality match.

Performance wise :
For 66 criterions and 247320 variables
Using regex, variablesGroups::search takes 74s out of 90 (82%)
Using find it takes 0.5s out of 20 (2,5%)

@tbittar tbittar self-requested a review December 17, 2024 16:55
@tbittar tbittar merged commit c339afd into develop Dec 20, 2024
25 checks passed
@tbittar tbittar deleted the feature/replace_regex branch December 20, 2024 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants