Rust regex replace_all slower than PHP regex preg_replace_callback, how to optimize?

Correct, but this should be at least at the same speed and not slower. I presumed earlier that it should be faster, because Rust should do the regex compilation during compile time and not during run-time like PHP does. Turns out it is not the case currently and I'll be happy to get the same speed level. I'm trying now with pcre2 crate. Thanks!

1 Like