-
Notifications
You must be signed in to change notification settings - Fork 58
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
Pattern compilation should not be included in elapsed time #2
Comments
Pattern compilation is a necessary part of regex process and not always patterns can be reused. I'm sorry but the benchmark can’t be good for all scenarios. Anyway, I have tested it again and the results are similar: Including pattern compilation: C PCRE2 | 24.59 | 23.55 | 5.55 | 53.69 Excluding pattern compilation (if apply): C PCRE2 | 23.84 | 23.53 | 5.82 | 53.19 By the way, you can check the |
I have tested myself and I agree with you. The result does not make significant difference whether including pattern compilation or not. |
A compiled regular expression is almost always used rather than recompiling each time.
And the measurement should be an average of multiple times.
A benchmark is only useful if it is close enough to real applications.
The text was updated successfully, but these errors were encountered: