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:
Lex: FT’s flagship investment column,推荐阅读新收录的资料获取更多信息
,更多细节参见新收录的资料
ВсеКиноСериалыМузыкаКнигиИскусствоТеатр。新收录的资料是该领域的重要参考
Трамп высказался о важных целях для ударов в Иране02:32