[Python-Dev] Optimization versus code bloat
Skip Montanaro
skip at pobox.com
Mon Dec 29 09:01:28 EST 2003
Hye-Shik> I posted a patch[1] optimizing str.split with specialized
Hye-Shik> splitter as unicode.split do. The patch accellates str.split
Hye-Shik> about 10~20% and adds about 50 lines. I'm curious whether it's
Hye-Shik> acceptable ratio for python-dev moods.
Hye-Shik> [1] http://www.python.org/sf/866875
Seems like a reasonable addition to me, especially if the same optimization
is performed for unicode objects. I'm a bit confused about all the changes
to test_string.py though. Since your change is only for performance it
seems to me that no changes to the test suite would have been necessary
unless it wasn't covering some critical tests. Was that just a
rearrangement of that file or did you add some new test cases? Whether or
not your optimization is accepted, if your test cases beef up the test
suite, I'd vote to add them.
Skip
More information about the Python-Dev
mailing list