3 ms·
Benchmark of Regex Libraries (2010)
- kbenson 12y agoFirstly, at the end it says "Last modified: 2010-07-21" Secondly, there's a lot more to regex engines than the paltry features listed here. It's important to look at more complex features and if they are supported and how they perform. Many engines will have multiple regex implementations, some optimized for fewer features, and swap in the best engine for the task at hand. Others will just forego more complex features for a speedy implementation. This matters. For a regex heavy project, if you choose an system that turns out to be fast but doesn't support a needed later feature, it can be a problem.
- fny 12y agoThis brings to mind the fantastic "Regular Expression Matching can be Simple and Fast"[0] article. [0]: http://web.archive.org/web/20150315004427/http://swtch.com/~rsc/regexp/regexp1.html http://web.archive.org/web/20150315004427/http://swtch.com/~...
- karavelov 12y agoThis is benchmarking Perl-5.8 that was already 3 years old in 2010. With Perl-5.10 there is an optimization for matching alternations (|) that should drastically change the results for the "URI|Email" pattern. In later versions of Perl (the last stable is 5.20) there are more optimizations in the RE engine and better Unicode support.