Author Dennis Sweeney
Recipients Dennis Sweeney, Zeturic, ammar2, josh.r, pmpp, serhiy.storchaka, tim.peters, vstinner
Date 2020-10-12.07:00:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1602486037.37.0.432481970982.issue41972@roundup.psfhosted.org>
In-reply-to
Content
Here is a C implementation of the two-way algorithm that should work as a drop-in replacement for Objects/stringlib/fastsearch.h.

Benchmarking so far, it looks like it is a bit slower in a lot of cases. But it's also a bit faster in a some other cases and oodles faster in the really bad cases.

I wonder if there's a good heuristic cutoff (for the needle size?) where the two-way usually becomes better.
History
Date User Action Args
2020-10-12 07:00:37Dennis Sweeneysetrecipients: + Dennis Sweeney, tim.peters, vstinner, pmpp, serhiy.storchaka, josh.r, ammar2, Zeturic
2020-10-12 07:00:37Dennis Sweeneysetmessageid: <1602486037.37.0.432481970982.issue41972@roundup.psfhosted.org>
2020-10-12 07:00:37Dennis Sweeneylinkissue41972 messages
2020-10-12 07:00:37Dennis Sweeneycreate