STINNER Victor <victor.stin...@haypocalc.com> added the comment: Sorted and grouped results. "replace", "find" and "concat" should be easy to fix, "strip" and "split" depend on "find" performance.
replace: - b"...text.with.2000.lines...replace(b"\n", b" ") (*10): -37.668161% find: - (b"A"*1000).find(b"B") (*1000): -30.379747% - b"Andrew".startswith(b"A") (*1000): -20.588235% - b"Andrew".startswith(b"Anders") (*1000): -23.529412% - b"Andrew".endswith(b"w") (*1000): -23.529412% - b"Andrew".endswith(b"Andrew") (*1000): -22.857143% - b"Andrew".endswith(b"Anders") (*1000): -23.529412% - b"B" in b"A"*1000 (*1000): -32.089552% concat: - b"Andrew"+b"Dalke" (*1000): -23.076923% strip: - b"\nHello!\n".strip() (*1000): -33.333333% - b"Hello!\n".strip() (*1000): -35.714286% - b"\nHello!".strip() (*1000): -28.571429% - b"Hello\t \t".rstrip() (*1000): -33.333333% - b"\t \tHello".rstrip() (*1000): -33.333333% - b"Hello!\n".rstrip() (*1000): -35.714286% - b"\nHello!".rstrip() (*1000): -35.714286% split: - dna.split(b"ACTAT") (*10): -21.066667% - (b"Here are some words. "*2).split() (*1000): -22.105263% - b"this\nis\na\ntest\n".split(b"\n") (*1000): -23.437500% - b"this--is--a--test--of--the--emergency--broadcast--system".split(b"--") (*1000): -22.429907% - b"this\nis\na\ntest\n".rsplit(b"\n") (*1000): -23.437500% - (b"A"*1000).rpartition(b"A") (*1000): -21.212121% ---------- nosy: +haypo _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13622> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com