Skip to content
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

[RFC] Consider to replace zlib with zlib-ng #330

Closed
ptr1337 opened this issue Sep 1, 2024 · 1 comment · Fixed by #332
Closed

[RFC] Consider to replace zlib with zlib-ng #330

ptr1337 opened this issue Sep 1, 2024 · 1 comment · Fixed by #332
Assignees
Labels
enhancement New feature or request

Comments

@ptr1337
Copy link
Member

ptr1337 commented Sep 1, 2024

Copy from Fedora RFC:

Zlib has long served as a reliable compression library, but its performance on modern CPU architectures does not fully utilize their capabilities. The transition to Zlib-ng aims to enhance the compression efficiency and performance for Fedora while ensuring compatibility with existing packages and libraries.

Benefits for CachyOS

  • Zlib-ng supports hardware acceleration when available
  • Adler32 implementation using SSSE3, AVX2, AVX512, AVX512-VNNI, Neon, VMX & VSX
  • CRC32-B implementation using PCLMULQDQ, VPCLMULQDQ, ACLE, & IBM Z
  • Hash table implementation using CRC32-C intrinsics on x86 and ARM
  • Slide hash implementations using SSE2, AVX2, ARMv6, Neon, VMX & VSX
  • Compare256 implementations using SSE2, AVX2, Neon, POWER9 & RVV
  • Inflate chunk copying using SSE2, SSSE3, AVX, Neon & VSX
  • Support for hardware-accelerated deflate using IBM Z DFLTCC
  • Includes Intel and Cloudflare optimizations
  • Uses code sanitizers, fuzzing, and code coverage

Integration

  1. Install zlib-ng to users system
  2. Provide and install zlib-ng-compat from the AUR into the cachyos-repository
  3. Likely, create a lib32-zlib-ng and lib32-zlib-ng compat package, which replaces zlib-ng

Question

We need to look into, if there are any recompilation required. Normally, this should work as drop in replacement but should be looked deeper into

@ptr1337 ptr1337 added the enhancement New feature or request label Sep 1, 2024
@ptr1337
Copy link
Member Author

ptr1337 commented Sep 1, 2024

Im running currently zlib-ng-compat on my system, and did not notice any major flaws yet.
It requires a little hacky workaround, when using not a lib32-zlib-ng-compat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants