3 ms·
The Rust regex library does use various techniques that RE2 and Go's library also use (and has from the start, that patch is just adding another feature that wa
by dbaupp 10y ago
The Rust regex library does use various techniques that RE2 and Go's library also use (and has from the start, that patch is just adding another feature that was missing), but it is generally faster than both of those libraries: take a look at the benchmarks in the link.
- deleted 10y ago[deleted]
- burntsushi 10y ago@jerf - In response to your deleted comment, the README explains some of the numbers. The really crazy numbers are silly, and I say so in the README. However, there are plenty of benchmarks well over 10x that are not silly at all. Look at the second block. The BeforeHolmes benchmark in particular is a good litmus test, since it defeats most optimizations. Those particular speed ups are due to algorithms used. RE2 would have a similar speedup when compared with Go's regexp package. Some of the other benchmarks in the 100x-400x range are likely due to smarter use of literal scanning.