Serhiy Storchaka <storch...@gmail.com> added the comment:

I used stringbench and self-writen script (see issue13165) for comparison and 
saw no convincing difference. The difference to str.find does not exceed 
accidental deviations for other functions which are not affected by the patch. 
Apparently, the accuracy of stringbench is not enough for a reliable 
measurement.

========== late match, 100 characters
  +8.6    +8.8  s="ABC"*33; ((s+"D")*500+s+"E").find(s+"E") (*100)
  +0.1    +0.2  s="ABC"*33; ((s+"D")*500+"E"+s).find("E"+s) (*100)
  +7.9    +7.4  s="ABC"*33; (s+"E") in ((s+"D")*300+s+"E") (*100)
  +7.2    +7.3  s="ABC"*33; ((s+"D")*500+s+"E").index(s+"E") (*100)
  +8.0    +7.9  s="ABC"*33; ((s+"D")*500+s+"E").partition(s+"E") (*100)
  -4.3    -4.3  s="ABC"*33; ("E"+s+("D"+s)*500).rfind("E"+s) (*100)
  -4.9    -6.9  s="ABC"*33; (s+"E"+("D"+s)*500).rfind(s+"E") (*100)
  -3.0    -3.0  s="ABC"*33; ("E"+s+("D"+s)*500).rindex("E"+s) (*100)
  -3.7    -4.2  s="ABC"*33; ("E"+s+("D"+s)*500).rpartition("E"+s) (*100)
  -4.0    -2.6  s="ABC"*33; ("E"+s+("D"+s)*500).rsplit("E"+s, 1) (*100)
 +28.0    +6.5  s="ABC"*33; ((s+"D")*500+s+"E").split(s+"E", 1) (*100)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13126>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to