[issue41972] bytes.find consistently hangs in a particular scenario

Gregory P. Smith report at bugs.python.org
Fri Oct 16 15:17:43 EDT 2020


Gregory P. Smith <greg at krypto.org> added the comment:

Another potential algorithm to consider in large needle situations is a Rabin-Karp rolling hash string search.

If used, it's the kind of algorithm that I'd probably bail out to an alternate method on if a run of Rabin-Karp started having a high percentage of false positive failed comparisons (suggesting data antagonistic to the chosen rolling hash algorithm(s) which would degenerate performance back to Needle*Haystack territory).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41972>
_______________________________________


More information about the Python-bugs-list mailing list