4 ms·
Yes, ripgrep (or specifically, the Rust regex crate) takes inspiration from Hyperscan for its SIMD matching. https://github.com/rust-lang/regex/commit/203c509d
by lambda 8y ago
Yes, ripgrep (or specifically, the Rust regex crate) takes inspiration from Hyperscan for its SIMD matching.
https://github.com/rust-lang/regex/commit/203c509df9e1dcba61eaa60ba9c09be9ca0c4b25 https://github.com/rust-lang/regex/commit/203c509df9e1dcba61...
Both libraries also rely on a number of techniques from existing published research.
Hyperscan is ruthlessly optimized for x86 platforms, but has dropped support for non-x86 platforms. Rust's regex crate is designed more as a general purpose, portable regular expression implementation, suitable for wide scale use.
- glangdale 8y agoI like 'ruthlessly'. It sounds very butch, especially applying to an activity largely carried out by seated, balding men hunched over terminals in an office. Rust regex is suited to wide scale use. By comparison to Hyperscan, it is not suited to the kind of large scale cases that Hyperscan handles, but it's well done. Many of Hyperscan techniques are sui generis, not published. Hopefully some of that will be rectified over time.