TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Regular Expression Matching Can Be Simple and Fast (2007)

73 点作者 prabhupant将近 6 年前

8 条评论

feniv将近 6 年前
The author, Russ Cox, has a whole series of articles on the topic of regex - <a href="https:&#x2F;&#x2F;swtch.com&#x2F;~rsc&#x2F;regexp&#x2F;" rel="nofollow">https:&#x2F;&#x2F;swtch.com&#x2F;~rsc&#x2F;regexp&#x2F;</a><p>The rust Regex crate docs even refer to his posts as a reference since the rust version is based on his efficient RE2 Regex implementation at Google.
dang将近 6 年前
Threads from 2018: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16341519" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16341519</a><p>2015: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=9374858" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=9374858</a><p>2009: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=820201" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=820201</a><p>also 2009: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=466845" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=466845</a>
Quarrel将近 6 年前
But if you want faster, (but more complicated):<p><a href="https:&#x2F;&#x2F;github.com&#x2F;intel&#x2F;hyperscan" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;intel&#x2F;hyperscan</a>
评论 #20314948 未加载
DigitalTerminal将近 6 年前
Also relevant is Google V8&#x27;s Irregexp: <a href="https:&#x2F;&#x2F;blog.chromium.org&#x2F;2009&#x2F;02&#x2F;irregexp-google-chromes-new-regexp.html" rel="nofollow">https:&#x2F;&#x2F;blog.chromium.org&#x2F;2009&#x2F;02&#x2F;irregexp-google-chromes-ne...</a>. They claim 3x speedups.
评论 #20312539 未加载
pier25将近 6 年前
A bit off topic, but here are some Regex benchmarks that might be of interest:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;mariomka&#x2F;regex-benchmark" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mariomka&#x2F;regex-benchmark</a><p>Surprisingly JS is about 10 times faster than Go.
评论 #20313531 未加载
yxhuvud将近 6 年前
What I wonder is if the regexps could be preprocessed in a way so that the fast variant is used for all or at least most cases where it it possible to use it.
abainbridge将近 6 年前
Is there any information about the performance when not looking for things like when a?a?a?aaa matches aaaaaa?
hyperpallium将近 6 年前
Now you have an exponential space problem.
评论 #20312174 未加载
评论 #20313759 未加载
评论 #20311554 未加载
评论 #20311463 未加载