Dennis Sweeney <sweeney.dennis...@gmail.com> added the comment:

I'm doing a couple more timing tests to try to understand exactly when the 
cutoff should be applied (based on some combination of needle and haystack 
lengths).

Can the rolling hash algorithm be made to go sublinear like O(n/m)? It looked 
like it was pretty essential that it hash/unhash each and every haystack 
character. You could probably do a bloom-like check where you jump ahead by the 
needle length sometimes, but you'd then have to re-hash the m characters in the 
new window anyway.

----------

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

Reply via email to