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 serhiy.storchaka
Recipients pitrou, serhiy.storchaka, vstinner
Date 2012-03-27.13:42:54
SpamBayes Score 3.7638226e-12
Marked as misclassified No
Message-id <201203271642.28430.storchaka@gmail.com>
In-reply-to <1332849815.13.0.651392018601.issue14419@psf.upfronthosting.co.za>
Content
> 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.
History
Date User Action Args
2012-03-27 13:42:55serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, vstinner
2012-03-27 13:42:55serhiy.storchakalinkissue14419 messages
2012-03-27 13:42:54serhiy.storchakacreate