Sam Russell wrote: > As for your question on speed, I noticed between zstd (which uses zlib as a > backend) and gzip there seems to be an improvement of maybe 30-40% for > decompressing a 100MB file (part of this is due to multithreading though),
If you compare two scenarios which differ in 4 aspects: - different general codebase, - different CRC32 implementation, - different multithreading, - code compared with -fPIC (shared library) vs. without -fPIC (gzip program), you cannot draw any conclusion. In order to make a valid point, you need to vary _one_ aspect only. > and gprof shows the CRC calculation being maybe 40-50% of the CPU cycles Don't blindly trust gprof figures. gprof is sensitive to a function's size and invocation frequency. There are better profilers [1], but in this case what I asked for is not a profiling but a comparison of two scenarios that differ in 1 aspect, each compiled in the usual way ("gcc -O2", with a recent gcc, on x86_64 or arm64). Bruno [1] https://gitlab.com/ghwiki/gnow-how/-/wikis/Profiling