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
Date 2013-04-21.21:42:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1366580520.97.0.557756164543.issue17812@psf.upfronthosting.co.za>
In-reply-to
Content
And here are other patch, which not only fixes an issue with quadratic complexity, but optimize b32encode and b32decode about 2.5 times.

Microbenchmarks:

./python -m timeit -r 1 -n 10 -s "from base64 import b32encode as encode; data = open('python', 'rb').read(1000001)"  "encode(data)"
./python -m timeit -r 1 -n 1 -s "from base64 import b32encode as encode, b32decode as decode; data = encode(open('python', 'rb').read(1000001))"  "decode(data)"

Results:
           First patch  Second patch
b32encode    1.25 sec     486 msec
b32decode    2.08 sec     835 msec
History
Date User Action Args
2013-04-21 21:42:00serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou
2013-04-21 21:42:00serhiy.storchakasetmessageid: <1366580520.97.0.557756164543.issue17812@psf.upfronthosting.co.za>
2013-04-21 21:42:00serhiy.storchakalinkissue17812 messages
2013-04-21 21:42:00serhiy.storchakacreate