3 ms·
Does this RegEx library utilize a JIT, just like the ones in most JavaScript implementations? If not, then perhaps this is a case where JavaScript beats Rust.
by amelius 3y ago
Does this RegEx library utilize a JIT, just like the ones in most JavaScript implementations?
If not, then perhaps this is a case where JavaScript beats Rust.
- burntsushi 3y agoNope. Usually only backtrackers have a JIT (not strictly true, I believe there is a JIT of a Thompson NFA and there is also redgrep). This library is not a backtracker. I would be interested in experimenting with a JIT in the future, primarily as a way to speed up capture group extraction. But this regex library uses a lazy DFA, which has excellent theoughput characteristics compared to the normal backtracking interpreter (and perhaps even a backtracking JIT). > If not, then perhaps this is a case where JavaScript beats Rust. Haha. No. Follow the link to rebar to see performance comparisons. A JIT isn't everything. https://github.com/BurntSushi/rebar https://github.com/BurntSushi/rebar