[issue30476] Add _GenerateCRCTable() to zipfile.py to pre-compute CRC Table

Serhiy Storchaka report at bugs.python.org
Sat May 27 01:02:59 EDT 2017


Serhiy Storchaka added the comment:

After some investigations this idea no longer looks good to me.

The table of 256 32-bit integers will take at least 44 lines. This is too large. It is easier to check the algorithm than all these numbers. The error even in one digit can break all, but for testing we should check every element of the table. In any case we would need a generating code, either for generating the sources, or for testing.

Current generating code is 25% faster than the code used in 2.7, and (surprisingly!) Python 3.7 is 50% faster than Python 2.7 in the computation of the same code. On my computer the generating takes 1 ms (the startup time of the interpreter is 50 ms), and the table is generated only if ZIP file decryption is used, and only once.

----------
resolution: not a bug -> rejected

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30476>
_______________________________________


More information about the Python-bugs-list mailing list