First stable release of zlib-ng, a high performance fork of zlib

A release of the zlib-ng 2.0 library is available which is marked as the first stable release of the project (corrective release 2.0.1 is already available next). Zlib-ng is compatible with zlib at the API level, but provides additional optimizations not accepted into the official zlib repository due to its conservative approach to accepting changes. Additionally, a modernized API based on zlib has been proposed, but modified to simplify porting. The project code is written in C and distributed under the Zlib license.

Tests performed on x86_64 systems show that Zlib-ng is about 4 times faster than zlib and 2.1 times faster than gzip when performing compression operations. When decompressing, Zlib-ng is about 2.4 times faster than zlib and 1.8 times faster than gzip. A significant increase in compression/decompression performance was achieved mainly due to the use of SSE*, AVX2, VSX and Neon vector instructions.

Added implementation of Adler32 checksum algorithm optimized with SSSE3, AVX2, Neon and VSX instructions, CRC32-B implementation based on PCLMULQDQ and ACLE, improved hash tables, implementation of Slide hash based on SSE2, AVX2, Neon and VSX , comparison operations based on SSE4.2 and AVX2. It also includes performance-enhancing changes used in forks from Intel and Cloudflare. Optimized the process of working with buffers. Added support for CMake and NMake build systems. Continuous integration systems are used for testing.

In addition to optimizations, Zlib-ng also included patches accumulated in distribution packages and cleaned the code from workarounds used in zlib to support older compilers and platforms, but hinder the implementation of more efficient methods (for example, restrictions required to support 16-bit systems and non-ANSI C compilers). Work has been done to identify and fix bugs identified by static analyzers, fuzzing testing systems, and tools for detecting problems when working with memory (AddressSanitizer and MemorySanitizer).

Source: opennet.ru

Add a comment