Get the latest tech news
Zlib-rs is faster than C
zlib-rs is faster than C We've released version 0.4.2 of zlib-rs, featuring a number of substantial performance improvements. We are now (to our knowledge) the fastest api-compatible zlib implementation for decompression, and beat the competition in the most important compression cases too.
We have a baseline implementation that works on all CPUs, and then some number of specialized versions that use SIMD instructions or other features that may or may not be available on a particular CPU. chunk sizezlib-chromiumzlib-rsΔ4 227.39M ± 363.82K259.40M ± 492.87K💩 +12.34% 5 181.29M ± 471.36K190.91M ± 343.64K💩 +5.04% 6 146.09M ± 160.70K148.51M ± 193.07K💩 +1.63% 7 126.91M ± 164.98K126.24M ± 113.62K🚀 -0.53% 8 118.13M ± 94.51K116.36M ± 116.36K🚀 -1.53% 9 114.83M ± 91.86K111.99M ± 100.79K🚀 -2.53% 10 113.20M ± 90.56K111.18M ± 111.18K🚀 -1.82% 11 114.20M ± 102.78K112.16M ± 201.89K🚀 -1.81% 12 114.55M ± 103.10K111.82M ± 89.45K🚀 -2.44% 13 108.87M ± 87.09K106.27M ± 138.15K🚀 -2.44% 14 99.55M ± 129.41K 95.13M ± 95.13K🚀 -4.64% 15 92.35M ± 157.00K 87.72M ± 96.49K🚀 -5.28% 16 90.01M ± 180.02K 84.53M ± 84.53K🚀 -6.48% We've been chipping away at compression too (shoutout to Brian Pane, who contributed numerous PRs in this area), but see more mixed results. However, we're missing some less commonly used API functions related to gzip files that would make us a complete drop-in replacement in all cases.
Or read this on Hacker News