Patch to optimize this: make it 10 times faster. Try attached benchmark script. On a debug build I got the following results: * original: 299.8 ms * patched: 23.2 ms I expected a factor of 10 because it uses a C implementation of rot13 instead of an hand made Python implementation.
STINNER Victor wrote: > > New submission from STINNER Victor <victor.stinner@haypocalc.com>: > > Patch to optimize this: make it 10 times faster. > > Try attached benchmark script. On a debug build I got the following results: > * original: 299.8 ms > * patched: 23.2 ms > > I expected a factor of 10 because it uses a C implementation of rot13 instead of an hand made Python implementation. It's a bit late for an April 1st patch, but +1 for the fun of it :-)
That's a good one, but um, no not for 2.6, unless you can argue that a delay in obtaining the received wisdom of The Timbot is a serious security hole in Python. Bag of ham.