Message157872
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) |
|
Date |
User |
Action |
Args |
2012-04-09 17:57:15 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, pitrou, vstinner, flox |
2012-04-09 17:57:15 | serhiy.storchaka | set | messageid: <1333994235.61.0.378536048926.issue13126@psf.upfronthosting.co.za> |
2012-04-09 17:57:15 | serhiy.storchaka | link | issue13126 messages |
2012-04-09 17:57:14 | serhiy.storchaka | create | |
|