Josh Rosenberg added the comment:

Aho Corasick doesn't seem likely to be useful here; it's good if the haystack 
is huge (or you have many haystacks to search) and you have many needles to 
look for (and the needles never change), but it pays a fairly steep setup cost; 
for a utility that searches for a single subsequence once, with no history, 
Aho-Corasick wouldn't help much.

A variant on Boyer-Moore (which involves less preprocessing work on the needle) 
might help, but I'm not sure the feature is compelling enough to warrant 
acceleration in the first place.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25898>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to