Re:Pydis – Redis clone in 250 lines of Python, for performan...
by formerly_proven on Sunday November 15, 2020 @08:55AM
(#25101184)
The Python zipfile module is actually just that, Python. It performs well enough, with compression zlib is the limiting factor anyway.
[ Parent
| on HN ]
Re:Pydis – Redis clone in 250 lines of Python, for performan...
by quietbritishjim on Sunday November 15, 2020 @09:06AM
(#25101261)
OK, by my own rules that means it's "written in Python" then. But in that case what I actually meant is that majority of time in calls to zipfile is spent in pure C, not in the Python interpreter loop, and if it's based on zlib then that agrees with what I meant.
(There is an exception I didn't mention: if the zip is encrypted then the zipfile module falls back to pure Python code. The difference is very noticeable!)