zstd icon indicating copy to clipboard operation
zstd copied to clipboard

gzip now uses AVX and pclmul, would zstd also benefit?

Open Fireobirdy opened this issue 8 months ago • 1 comments

There were some article about gzip using now complex instructions of x86_64 CPUs such as AVX and pclmul. My question is, is there a way to compile zstd with these features? I am using zstd heavily for compression and decompression of large archives. So a little improvement would help a lot.

Fireobirdy avatar Apr 19 '25 14:04 Fireobirdy

zstd already makes use of advanced instruction sets when available, including explicit support for BMI2 and AVX2. In addition, it employs coding techniques that facilitate auto-vectorization.
These optimizations are not recent—they have been integral to the zstd codebase for many years.

It's also worth noting that leveraging these instruction sets is not a matter of flipping a switch; it often requires substantial code refactoring to be effective.

Cyan4973 avatar Apr 29 '25 15:04 Cyan4973