Serhiy Storchaka <storch...@gmail.com> added the comment: > New tests. I'm not conviced by the patch: it slows down the decoder for > "short" strings. I don't understand which kind of ASCII encoded strings > (specific length or content?) are optimized by the patch.
May be you forgot the -r? Add -r 100 or -r 1000 and run tests a few times to evaluate the dispersion. I get the acceleration in all cases. For `bytes(range(128))*10` it barely exceeds variation (second patch is slightly faster than first one), for `bytes(range(128))*1000` it is 1.7x faster. For more short strings (under "short" I knew the length of the order of 10) measurement is thus quite impossible. This may also depend on the processor and compiler. I have AMD Athlon 64 X2 4600+ (2-core, 2.4GHz, 512 KB cache) and use gcc 4.4.3 on 32-bit Linux. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14419> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com