]> granicus.if.org Git - python/commit
needforspeed: use "fastsearch" for count and findstring helpers. this
authorFredrik Lundh <fredrik@pythonware.com>
Wed, 24 May 2006 14:28:11 +0000 (14:28 +0000)
committerFredrik Lundh <fredrik@pythonware.com>
Wed, 24 May 2006 14:28:11 +0000 (14:28 +0000)
commit6471ee4f1862432363294e5e069524f4ee8442ee
treeed222f3812c11619e46d80050c02f1fc70c8e353
parent240bf2a8e48369e330bfd25e3a346e3f18151006
needforspeed: use "fastsearch" for count and findstring helpers.  this
results in a 2.5x speedup on the stringbench count tests, and a 20x (!)
speedup on the stringbench search/find/contains test, compared to 2.5a2.

for more on the algorithm, see:

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

if you get weird results, you can disable the new algoritm by undefining
USE_FAST in Objects/unicodeobject.c.

enjoy /F
Objects/unicodeobject.c