[issue7462] Implement fastsearch algorithm for rfind/rindex

Fredrik Lundh report at bugs.python.org
Mon Jan 4 10:20:23 CET 2010


Fredrik Lundh <fredrik at effbot.org> added the comment:

Thanks Florent!

> Are there any simple, common cases that are made slower by this patch? 

The original fastsearch implementation has a couple of special cases to make sure it's faster than the original code in all cases.  The reason it wasn't implemented for reverse search was more a question of developer time constraints; reverse search isn't nearly as common as forward search, and we had other low-hanging fruit to deal with.

(btw, while it's great that someone finally got around to fix this, it wouldn't surprise me if replacing the KMP implementation in SRE with a fastsearch would save as many CPU cycles worldwide as this patch :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7462>
_______________________________________


More information about the Python-bugs-list mailing list