| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
Thanks for your review and suggestions @ambv! I updated the code. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This also includes the changes from #25011 for bpo-43612. These make more sense in the context of these changes.
Currently gzip.compress and gzip.decompress are implemented with GzipFile. This is a lot of overhead when a simple in memory compression is needed. As shown in the benchmarks below, the overhead is considerable for datasizes below 4096 bytes (which are probably very common targets for in memory compression and decompression).
This PR changes the implementations to compress and decompress in memory.
I compiled python before and after this change with --enable-optimizations to ensure a fair comparison.
I used this script to benchmark:
Before:
After:
https://bugs.python.org/issue43613