This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Boris.FELD, collinwinter, vstinner
Date 2011-12-17.18:42:05
SpamBayes Score 0.13961466
Marked as misclassified No
Message-id <1324147326.26.0.433939224649.issue13623@psf.upfronthosting.co.za>
In-reply-to
Content
Grouped results.

find (first):

- (b"A"*1000).find(b"A")    : -70%
- (b"A"*1000).rfind(b"A")   : -70%
- (b"A"*1000).index(b"A")   : -71%
- (b"A"*1000).rindex(b"A")  : -68%

- (b"AB"*1000).index(b"AB") : -68%
- (b"AB"*1000).rindex(b"AB"): -67%
- (b"AB"*1000).find(b"AB")  : -69%
- (b"AB"*1000).rfind(b"AB") : -69%

- b"Andrew".startswith(b"Andrew"): -20%
- b"Andrew".startswith(b"A")     : -21%
- b"Andrew".startswith(b"Anders"): -21%

- b"Andrew".endswith(b"w"): -21%

find (last):

- (b"AB"*300+"CA").find(b"CA")  : -33%
- (b"C"+"AB"*300).rindex(b"CA") : -29%
- (b"AB"*300+"C").find(b"BC")   : -28%
- (b"AB"*300+"C").index(b"BC")  : -28%
- (b"C"+b"AB"*300).rfind(b"CA") : -29%
- (b"BC"+b"AB"*300).rfind(b"BC"): -42%
- s=b"ABC"*33; (s+b"E"+(b"D"+s)*500).rfind(s+b"E"): -28%

find (not found):

- (b"A"*1000).find(b"B")    : -48%
- (b"A"*1000).rfind(b"B")   : -37%
- (b"AB"*1000).rfind(b"CA") : -20%
- (b"AB"*1000).rfind(b"BC") : -35%

others:

- b"B" in b"A"*1000           : -24%
- (b"A"*1000).partition(b"B") : -30%
History
Date User Action Args
2011-12-17 18:42:06vstinnersetrecipients: + vstinner, collinwinter, Boris.FELD
2011-12-17 18:42:06vstinnersetmessageid: <1324147326.26.0.433939224649.issue13623@psf.upfronthosting.co.za>
2011-12-17 18:42:05vstinnerlinkissue13623 messages
2011-12-17 18:42:05vstinnercreate