-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Update to zlib-ng 2.2.5 #118457
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
Update to zlib-ng 2.2.5 #118457
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the zlib-ng library from version 2.2.4 to 2.2.5, marking this as a trial of an upstream pull request with the goal of getting test coverage. The update includes version string updates, build system improvements, and performance optimizations particularly for x86 and RISC-V architectures.
Key changes include:
- Version number updates across multiple files and build configurations
- Improvements to x86 feature detection and AVX512VNNI intrinsics handling
- Enhanced RISC-V architecture support with new toolchain configurations
- Build system refinements including additional compiler flag checks for Apple platforms
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/native/external/zlib-ng/zutil.c | Updates version string from 2.2.4 to 2.2.5 |
| src/native/external/zlib-ng/zlib.pc.in | Adds bindir variable to pkg-config template |
| src/native/external/zlib-ng/zlib.pc.cmakein | Adds bindir variable to CMake pkg-config template |
| src/native/external/zlib-ng/zlib.h.in | Updates version constants and macros to 2.2.5 |
| src/native/external/zlib-ng/zlib-ng.h.in | Updates version constants and macros to 2.2.5 |
| src/native/external/zlib-ng/deflate_medium.c | Optimizes match insertion logic and hash table management |
| src/native/external/zlib-ng/deflate.h | Updates comment about max_insert_length usage |
| src/native/external/zlib-ng/configure | Adds RISC-V support and additional compiler flag checks |
| src/native/external/zlib-ng/cmake/toolchain-riscv.cmake | Simplifies RISC-V toolchain configuration |
| src/native/external/zlib-ng/cmake/toolchain-riscv-clang.cmake | Adds new RISC-V Clang toolchain configuration |
| src/native/external/zlib-ng/cmake/detect-intrinsics.cmake | Improves AVX512VNNI intrinsics test robustness |
| src/native/external/zlib-ng/cmake/detect-arch.cmake | Removes redundant enable_language(C) call |
| src/native/external/zlib-ng/arch/x86/x86_functions.h | Minor formatting and comment improvements |
| src/native/external/zlib-ng/arch/x86/x86_features.c | Reorders feature detection logic and improves comments |
| src/native/external/zlib-ng/arch/x86/chunkset_avx512.c | Adds MSVC compiler workaround for optimization bug |
| src/native/external/zlib-ng/arch/s390/s390_functions.h | Fixes macro definition syntax error |
| src/native/external/zlib-ng/arch/riscv/chunkset_rvv.c | Adds safety check for negative distance values |
| src/native/external/zlib-ng/arch/riscv/Makefile.in | Adds complete RISC-V architecture Makefile |
| src/native/external/zlib-ng/Makefile.in | Updates version number in main Makefile |
| src/native/external/zlib-ng/CMakeLists.txt | Improves C++ language enablement and adds Apple-specific compiler flags |
| src/native/external/zlib-ng/.gitignore | Adds test data directories to ignore list |
| src/native/external/zlib-ng-version.txt | Updates version reference and upstream URL |
|
@dotnet/samsung Could you please take a look? These changes may be related to riscv64. |
|
I've confirmed this fixes the performance regression in highly compressible data that we reported.
|
|
@MihuBot benchmark System.IO.Compression |
|
The dotnet/performance benchmark results look mostly a wash to me - which is to be expected since those didn't catch the original regression (due to small payload sizes). |
|
For the test mentioned in dotnet/performance#4900: MihuBot/runtime-utils#1362
|
rzikm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Update: 8/7/2025 -- this is now ready to merge as zlib-ng published the release https://github.com/zlib-ng/zlib-ng/releases/tag/2.2.5
This is a trial of zlib-ng/zlib-ng#1943 with the goal of getting test coverage. We should update with final hash/tag once it's merged.We should see if we can get performance results on this.