Message187529
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 |
|
Date |
User |
Action |
Args |
2013-04-21 21:42:00 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, pitrou |
2013-04-21 21:42:00 | serhiy.storchaka | set | messageid: <1366580520.97.0.557756164543.issue17812@psf.upfronthosting.co.za> |
2013-04-21 21:42:00 | serhiy.storchaka | link | issue17812 messages |
2013-04-21 21:42:00 | serhiy.storchaka | create | |
|