This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What tools do you use for benchmarking? #326
Comments
Both intel and cloudflare forks make assumptions that we do not dare to. We have fixed a lot of corner-case bugs and regressions in code from both sources. Also we do not have all the latest cloudflare patches, since they are complicated to port over and in some cases make assumptions we can not live with. zlib-ng is compatible with multiple architectures and contain optimizations for multiple instruction set combinations. Our target above all is that the code should be safe, even if that means we cannot utilize some of the optimizations others do. I see from your benchmarks that we are doing pretty good compared to stock zlib at least. PR #310 should improve our decompression numbers quite a bit, at least if you test on an x86 platform. We are currently trying to get to the point where we can release a stable 1.0 version with a quality that can be used in programs and distros by default. After that, we can once again start looking at optimization opportunities. We have been talking about making a couple of our benchmarking utils available on github, so that is probably going to happen pretty soon, once we get rid of some hard-coded assumptions that might only be valid on our own developer workstation and such. I am using a home-made python script, while @sebpop I think is using the chromium zlib benchmarking suite. |
The problem with all those benchmarks (jsnell/zlib-bench, #261 Chromium zlib benchmark) @bmrzycki fixed the chromium benchmark for the decompress to be immune to this issue: |
I think this sounds like a bad excuse, and dont really see the relevance. Compression size is equal
..which is not always what one would want |
I will give you an example where compressed format change may impact the speed of decompression: This is only one of many examples I can think of that shows that compressed file representation is important when comparing different decompress implementations. |
Related to this issue, I have provided a dataset that shows a dramatic difference between CloudFlare and zlib-ng. The GZ format is popular in my field to compress brain images in the NIfTI format. These are often huge datasets, acquired as 16-bit integers with poor signal to noise. It is common to zero signal outside the brain, and conduct computations on 32-bit floating point data. These files have long runs of repeated values (e.g. all voxels outside the brain are zero). These images appear to compress much faster with CloudFlare. I would be very interested if anyone has any idea if zlib-ng can be updated to be more competitive (and I think this would have a real impact in my field. I am very aware that the zlib-ng team is focused on robustness over all-out performance. The cmake files in zlib-ng provide a lot of clever functions, and the benefits of zlib-ng are substantial relative to the standard zlib. Therefore, I completely expect people to defer investigating this issue until after the 1.0 release. As a minor aside, I do think the zlib-ng configure script could get a couple tweaks. First, it specifies |
@sebpop my pigz-bench attempts to address your concern regarding decompression tests. Each zlib-variant contributes compressed files to the corpus, and each lib-variant decompresses ALL of these files. So each tool decompresses the same files. At the moment, on x86-64 CloudFlare does have superior compression performance, perhaps reflecting the aggressive optimization that make assumptions @Dead2 refers to (though I have not detected any issues). On the other hand, the zlib-ng does show superior decompression for x86-64. The benchmark shows how pigz can be compiled with each variant, allowing the user to choose the variant that suits their taste. |
Thanks @neurolabusc for addressing the input data issue in your decompression benchmark. I will use your benchmark in my experiments. Thanks! |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Today I made some benchmarks using jsnell/zlib-bench, using the following config:
None of the results are in favor of zlib-ng, even tho it afaik uses patches from both intel and cf?
Am I missing something here? Why does intel outperform everyone on decompression?
What does cloudflare do at level 9?
results:
The text was updated successfully, but these errors were encountered: