Benchmarking Regex Engines: Rust vs. Re2 vs. Ruby
2025-05-02

SerpApi encounters challenges extracting data from modern websites, often relying on regular expressions. Their benchmark compares Ruby's Onigmo engine against Google's re2 and Rust's regex engine. Rust's regex engine proves fastest in most cases, especially with Unicode, but its set functionality is inconsistent. Re2 is also fast but has Unicode limitations. Pcre2's Ruby bindings are outdated. Rust's regex engine emerges as the best Ruby alternative, though caution is advised with its set feature.
Development