News for hackers. Stuff that matters.
Re:Go bindings to Rust's regex engine by AYBABTME on Monday May 02, 2016 @03:43PM (#11614857)
curious, why is the compile-time regex slower? is it just a less efficient implementation?
Re:Go bindings to Rust's regex engine by burntsushi on Monday May 02, 2016 @04:10PM (#11615119)
Regex::new has these tools at its disposal: Pike VM (NFA), backtracking (NFA), DFA (online), DFA (offline), Boyer-Moore

The plugin has these tools at its disposal: Pike VM.

But yeah, killercup is correct. The DFA (online) is one of the bigger reasons. But the offline DFA and Boyer-Moore are probably just as important.

You might glean more information from my hacking guide: https://github.com/rust-lang-nursery/regex/blob/master/HACKI...

Re:Go bindings to Rust's regex engine by killercup on Monday May 02, 2016 @03:53PM (#11614953)
Yes, several of the optimizations of the dynamic regexes aren't available in the compile-time version. (It doesn't even have a DFA, IIRC.)

There is [a lint][1] which checks that your regular expressions are valid (at compile time), though.

[1]: https://github.com/Manishearth/rust-clippy/wiki#invalid_rege...