Martin Morrison added the comment:

I've updated the Ascii85 algorithms to remove the quadratic complexity, and use 
a single struct.pack/unpack. They should now be much quicker for large input 
strings.

It's difficult to factor out commonality with b85* because the encodings and 
rules differ. This is especially true for decode (where Ascii85 allows 
arbitrary whitespace, so it either has to be stepped through as I've 
implemented it, or it would have to first be sanitised with .replace() or 
similar, which is expensive for large inputs). For encode, the special cases 
supported by Ascii85 make it impossible to *just* use a lookup table, and the 
simplified algorithm for encoding means it isn't necessary to use one at all. I 
also wanted to keep the Mercurial code intact as much as possible, so it can be 
kept in sync in future if necessary.

My notes from the previous diff also still apply if anyone has thoughts on 
those.

----------
Added file: http://bugs.python.org/file29852/issue17618-3.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17618>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to