Tim Peters <t...@python.org> added the comment:

Good sleuthing, Dennis! Yes, Fredrik was not willing to add "potentially 
expensive" (in time or in space) tricks:

http://effbot.org/zone/stringlib.htm

So worst-case time is proportional to the product of the arguments' lengths, 
and the cases here appear to, essentially, hit that.  It _was_ a goal that it 
always be at least as fast as the dirt-dumb search algorithm it replaced, and 
in good real-life (not just contrived) cases to be much faster.  It met the 
goals it had.

----------

_______________________________________
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