Issue 866875: str.split optimization for one character separaters (original) (raw)

Issue866875

Created on 2003-12-29 03:21 by hyeshik.chang, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
patch-strsplit.diff hyeshik.chang,2003-12-29 03:21 a patch
Messages (2)
msg45077 - (view) Author: Hyeshik Chang (hyeshik.chang) * (Python committer) Date: 2003-12-29 03:21
Attached patch tries to optimize str.split by a speciaiized splitter for one character separacters. This trick is used for unicode.split too. I just applied it to str.split. :) quick perf. test: - BEFORE - % ./python Lib/timeit.py '"/aaa/bbb/ccc/ddd/eee/fff/ggg/hhh/iii".split("/")' 100000 loops, best of 3: 7.84 usec per loop - AFTER - % ./python Lib/timeit.py '"/aaa/bbb/ccc/ddd/eee/fff/ggg/hhh/iii".split("/")' 100000 loops, best of 3: 5.39 usec per loop
msg45078 - (view) Author: Hyeshik Chang (hyeshik.chang) * (Python committer) Date: 2004-01-05 00:30
Logged In: YES user_id=55188 Committed as string_tests.py 1.37 and stringobject.c 2.217
History
Date User Action Args
2022-04-11 14:56:01 admin set github: 39736
2003-12-29 03:21:45 hyeshik.chang create