The Compound Effect
one optimization that i didn’t mention in the previous post but exists in both versions is skip acceleration. almost all serious regex engines have some form of this - the idea is simple: many states will self-loop on the majority of input bytes. for example, .* loops back to itself on every byte except \n - so why run the DFA transition 999 times when you can look up a whole chunk of the input in parallel and jump directly to the next \n? going back to the matching loop pseudocode from the previous post:
,推荐阅读新收录的资料获取更多信息
СюжетЧто нужно знать о «грязной бомбе»
Трамп пригрозил одной стране «недружественным переворотом»02:18
。业内人士推荐新收录的资料作为进阶阅读
fn main() - int {
}If as Expression,更多细节参见新收录的资料