Marc-Andre Lemburg added the comment:
On 04.11.2014 10:41, Antoine Pitrou wrote:
>
> Antoine Pitrou added the comment:
>
> This is similar to the idea of loading the stdlib from a zip file (but less
> intrusive and more debugging-friendly). The time savings will depend on
> whether the filesystem cache is cold or hot. In the latter case, my intuition
> is that decompression will slow things down a bit :-)
>
> Quick decompression benchmark on a popular stdlib module, and a fast CPU:
>
> $ ./python -m timeit -s "import zlib; data =
> zlib.compress(open('Lib/__pycache__/threading.cpython-35.pyc', 'rb').read())"
> "zlib.decompress(data)"
> 10000 loops, best of 3: 180 usec per loop
zlib is rather slow when it comes to decompression. Something like
snappy or lz4 could work out, though:
https://code.google.com/p/snappy/
https://code.google.com/p/lz4/
Those were designed to be fast on decompression.
----------
nosy: +lemburg
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue22789>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com