Message156923
> 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.
Then by choosing a string length that exceeds the L2 cache size, you may have found an ideal case for your optimization. Basically you're doing the error checking and the memcpy in one single pass.
Honestly I'm not sure that's worth the hassle. ASCII-decoding is already very fast for shorter strings.
(no need to pass "-n" or "-r" to timeit, it will figure out adequate numbers by itself) |
|
Date |
User |
Action |
Args |
2012-03-27 13:57:50 | pitrou | set | recipients:
+ pitrou, vstinner, serhiy.storchaka |
2012-03-27 13:57:50 | pitrou | set | messageid: <1332856670.84.0.0638698424463.issue14419@psf.upfronthosting.co.za> |
2012-03-27 13:57:50 | pitrou | link | issue14419 messages |
2012-03-27 13:57:50 | pitrou | create | |
|