26 ms·
May I ask why? From my understanding Rust just have revamped their regex[0] using the same (similar) scheme as in RE2, which is now the Go's implementation, am
by niersi 10y ago
May I ask why? From my understanding Rust just have revamped their regex[0] using the same (similar) scheme as in RE2, which is now the Go's implementation, am I misinformed?
[0]: https://github.com/rust-lang-nursery/regex/commit/e5a5198eeea6de2a10a2244fece8a1cc206faf22 https://github.com/rust-lang-nursery/regex/commit/e5a5198eee...
- dbaupp 10y agoThe 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.
- mastax 10y ago> I wrote these bindings primarily as a test case for the C API of Rust's regex library. In particular, I wanted to be sure that it was feasible to write low overhead bindings to another language. For the most part, I think that was a success. https://github.com/BurntSushi/rure-go#motivation https://github.com/BurntSushi/rure-go#motivation