PSA: regex! is now slower than Regex::new

It was requested that I post this here. :slight_smile: See the reddit thread for details. If you dig into the comments, there are some words about the new optimizations!



I know you really mean: Regex::new is awesomely much faster, surpassing regex!().


I hope so, I'm still figuring out whether this means regex! has gotten slower, or regex::new() has gotten faster :smiley:

It's unfortunately both. regex! lost the naive literal prefix optimization and never gain the more sophisticated one that is now in Regex::new. See: do simple literal prefix scanning in regex! ยท Issue #95 ยท rust-lang/regex ยท GitHub

1 Like