Message378472
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. |
|
Date |
User |
Action |
Args |
2020-10-12 07:00:37 | Dennis Sweeney | set | recipients:
+ Dennis Sweeney, tim.peters, vstinner, pmpp, serhiy.storchaka, josh.r, ammar2, Zeturic |
2020-10-12 07:00:37 | Dennis Sweeney | set | messageid: <1602486037.37.0.432481970982.issue41972@roundup.psfhosted.org> |
2020-10-12 07:00:37 | Dennis Sweeney | link | issue41972 messages |
2020-10-12 07:00:37 | Dennis Sweeney | create | |
|