Author serhiy.storchaka
Recipients christian.heimes, flox, isoschiz, jcea, pitrou, r.david.murray, serhiy.storchaka, sijinjoseph
Date 2013-04-20.23:23:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1366500221.32.0.0699469197309.issue17618@psf.upfronthosting.co.za>
In-reply-to
Content
There are some bugs in ascii85 end base85 implementations (see in Rietveld for details). Besides, ascii85 implementation was too slow. I've prepared a patch that corrects errors and speeds up encoding and decoding.

Microbenchmarks:

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

           Old patch  New patch
a85encode   8.4 sec    1.13 sec
b85encode   1.35 sec   1.09 sec
a85decode   9.28 sec   3.29 sec
b85decode   3.17 sec   2.37 sec
History
Date User Action Args
2013-04-20 23:23:41serhiy.storchakasetrecipients: + serhiy.storchaka, jcea, pitrou, christian.heimes, r.david.murray, flox, sijinjoseph, isoschiz
2013-04-20 23:23:41serhiy.storchakasetmessageid: <1366500221.32.0.0699469197309.issue17618@psf.upfronthosting.co.za>
2013-04-20 23:23:41serhiy.storchakalinkissue17618 messages
2013-04-20 23:23:41serhiy.storchakacreate