TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Benchmark of Regex Libraries (2010)

11 pointsby drumlabout 10 years ago

3 comments

karavelovabout 10 years ago
This 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 &quot;URI|Email&quot; pattern.<p>In later versions of Perl (the last stable is 5.20) there are more optimizations in the RE engine and better Unicode support.
kbensonabout 10 years ago
Firstly, at the end it says &quot;Last modified: 2010-07-21&quot;<p>Secondly, there&#x27;s a lot more to regex engines than the paltry features listed here. It&#x27;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.<p>This matters. For a regex heavy project, if you choose an system that turns out to be fast but doesn&#x27;t support a needed later feature, it can be a problem.
fnyabout 10 years ago
This brings to mind the fantastic &quot;Regular Expression Matching can be Simple and Fast&quot;[0] article.<p>[0]: <a href="http:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20150315004427&#x2F;http:&#x2F;&#x2F;swtch.com&#x2F;~rsc&#x2F;regexp&#x2F;regexp1.html" rel="nofollow">http:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20150315004427&#x2F;http:&#x2F;&#x2F;swtch.com&#x2F;~...</a>