NInickysielicki·Apr 18, 2025
std::regex is such a nightmare, I didn't take the time to run the code myself but I'd be curious if you would see the same delta if you swapped it for boost::regex or re2.
I think there's a case to be made for libaries like https://github.com/foonathan/lexy and/or https://github.com/boostorg/parser instead of reaching for a regex in the first place.
In Less Slow C++