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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Lightweight Indexing for Small Strings

36 点作者 silentbicycle超过 11 年前

2 条评论

jibsen超过 11 年前
One trick you could try is: in find_longest_match, if you already have a match, check if the byte at match_maxlen matches before doing the linear compare off all bytes up to it.<p>If that one byte does not match, the entire match has no chance of being longer than the current best (in this simple case).
评论 #7056646 未加载
评论 #7052314 未加载
ccleve超过 11 年前
A nice trick. It could be used for generalized string search as well as compression. And if you indexed bigrams instead of single characters, it could be even faster.<p>I especially like the clear, easy-to-understand, well-written presentation along with links to prior art. Wouldn&#x27;t it be nice if most academic papers were written like this?
评论 #7051597 未加载