Controversial opinion time: The advantages of Thompson NFA regexes are just theoretical and not worth it. PCRE is faster in the real world.
The post you’re responding to is from 2014. I readily admit that @burntsushi5’s Rust regex implementation proved me wrong.
-
-
Note that the context behind that post is from experience with SpiderMonkey’s JS regex implementation and in particular how it gets benchmarked. For JS regex benchmarks it is all about how quickly you can JIT the regex to something reasonable.
-
If I was silly enough to return to the world of regex (having been - ahem - granted my freedom by Intel) I think working with something where speed of starting to match an entirely unknown regex is paramount would be interesting. The world of Hyperscan, particularly, assumes ...
- 1 more reply
New conversation -
-
-
Ha. Welp, my tweetstorm is misdirected then. Silly me. Although in 2014 we'd been in business since about 2008 *selling* that capability (not widely known) and
@burntsushi5's implementation is hardly the first OSS proof point (Russ Cox's blog posts date from 2007 onwards). -
To be fair, PCRE2's *JIT* is still faster than Rust's regex library in several cases, and faster than RE2 in a lot more cases. Literal optimizations really help bring Rust above RE2, otherwise performance between the two is pretty similar. Hyperscan is a cut above the rest. :P
- 6 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.