This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tim.peters
Recipients Dennis Sweeney, Zeturic, ammar2, josh.r, pmpp, serhiy.storchaka, tim.peters, vstinner
Date 2020-10-08.17:31:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1602178303.7.0.636471941566.issue41972@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-10-08 17:31:43tim.peterssetrecipients: + tim.peters, vstinner, pmpp, serhiy.storchaka, josh.r, ammar2, Dennis Sweeney, Zeturic
2020-10-08 17:31:43tim.peterssetmessageid: <1602178303.7.0.636471941566.issue41972@roundup.psfhosted.org>
2020-10-08 17:31:43tim.peterslinkissue41972 messages
2020-10-08 17:31:43tim.peterscreate