We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
CTRE: latest main branch current moment.
for validate email I use: (?:(?:[^<>()\[\].,;:\s@"]+(?:\.[^<>()\[\].,;:\s@"]+)*)|".+")@(?:(?:[^<>()\[\].,;:\s@"]+\.)+[^<>()\[\].,;:\s@"]{2,}) regex.
(?:(?:[^<>()\[\].,;:\s@"]+(?:\.[^<>()\[\].,;:\s@"]+)*)|".+")@(?:(?:[^<>()\[\].,;:\s@"]+\.)+[^<>()\[\].,;:\s@"]{2,})
Let attached file (extension changed to LOG, because can't attach .cpp file): example.LOG
Build: $ clang++ -o example example.cpp -O2 -std=c++20 -stdlib=libc++ -Wall -Wextra -Werror -Wpedantic
$ clang++ -o example example.cpp -O2 -std=c++20 -stdlib=libc++ -Wall -Wextra -Werror -Wpedantic
Result in my PC i5-11400, 16GB RAM ubuntu 20.04 Clang 15.07:
$ ./example STD: less_valid = 1 upp_valid = 1 BOOST: less_valid = 1 upp_valid = 1 CTRE: less_valid = 1 upp_valid = 1 ==================================================== STD: valid_count = 21907 STD: elapsed time = 2.431440970 STD: is_valid_email took 2431 nanoseconds ===================================================== BOOST: valid_count = 21907 BOOST: elapsed time = 0.361886186 BOOST: is_valid_email took 361 nanoseconds ===================================================== CTRE: valid_count = 21907 CTRE: elapsed time = 1.335482155 CTRE: is_valid_email took 1335 nanoseconds ==================================================== ME: valid_count = 21907 ME: elapsed time = 0.042453908 ME: is_valid_email took 42 nanoseconds
CTRE took 1335 ns per call is_valid_email_ctre, boost took 361 ns, which more than 3 times faster CTRE's.
Hint: CTRE become slower when I added quoted symbols to test emails data.
Result when built with g++11.0:
$ ./example STD: less_valid = 1 upp_valid = 1 BOOST: less_valid = 1 upp_valid = 1 CTRE: less_valid = 1 upp_valid = 1 ==================================================== STD: valid_count = 22071 STD: elapsed time = 1.210953864 STD: is_valid_email took 1210 nanoseconds ===================================================== BOOST: valid_count = 22071 BOOST: elapsed time = 0.354756538 BOOST: is_valid_email took 354 nanoseconds ===================================================== CTRE: valid_count = 22071 CTRE: elapsed time = 0.614597561 CTRE: is_valid_email took 614 nanoseconds ==================================================== ME: valid_count = 22071 ME: elapsed time = 0.039021986 ME: is_valid_email took 39 nanoseconds
Now CTRE ~2 times slower than Boost regex.
The text was updated successfully, but these errors were encountered:
Seems CTRE slower when check "\.+" part of regex.
"\.+"
Sorry, something went wrong.
No branches or pull requests
CTRE: latest main branch current moment.
for validate email I use:
(?:(?:[^<>()\[\].,;:\s@"]+(?:\.[^<>()\[\].,;:\s@"]+)*)|".+")@(?:(?:[^<>()\[\].,;:\s@"]+\.)+[^<>()\[\].,;:\s@"]{2,})
regex.Let attached file (extension changed to LOG, because can't attach .cpp file):
example.LOG
Build:
$ clang++ -o example example.cpp -O2 -std=c++20 -stdlib=libc++ -Wall -Wextra -Werror -Wpedantic
Result in my PC i5-11400, 16GB RAM ubuntu 20.04 Clang 15.07:
CTRE took 1335 ns per call is_valid_email_ctre, boost took 361 ns, which more than 3 times faster CTRE's.
Hint: CTRE become slower when I added quoted symbols to test emails data.
Result when built with g++11.0:
Now CTRE ~2 times slower than Boost regex.
The text was updated successfully, but these errors were encountered: