Serhiy Storchaka added the comment:

After a more careful look of the b85encode code I say that it's implementation 
is not optimal. For the sake of simplicity the entire volume of data is copied 
several times. This can affect the processing of a large volume of data. On 
other hand, this dumb copying can be faster then more smart processing in 
a85encode. Only benchmarks will show the truth.

Using a trick with struct.unpack() has very unpleasant side effect. It might be 
a few speed up encoding, but creates the Struct object with the size is many 
times larger than the size of the processed data. Worse, this object is cached 
and continues to consume memory. Since the size of the data most likely will be 
unique, almost every call of b85encode creates a new object. This will lead to 
memory leaks.

----------

_______________________________________
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