Skip to content

Use Optimized Zlib-Intel to Build clrcompression.dll #15496

@bjjones

Description

@bjjones

Summary
Intel has developed an optimized version of Zlib that includes architecture specific optimizations and algorithmic changes to improve the included deflate() and crc32() functions. Since System.IO.Compression calls out to these functions through clrcompression.dll, I suggest that Zlib-Intel to be used to build clrcompression.dll.

Test Results
I have compiled the library myself, and by renaming the .dll to clrcompression.dll and replacing the clrcompression included with .NET Core, I see an improvement of 20-30% when doing compression using GZipStream on an Intel® 5th Generation Core (tm) i5 Processor based system, as well as on an Intel® Xeon® Processor E5 v2 Family based server system. The gain comes entirely from the optimized deflate() function.

Link
The developer of Zlib-Intel has provided support for VS Intrinsics here: https://github.com/jtkukunas/zlib/tree/win32_nmake

Metadata

Metadata

Assignees

Labels

area-System.IO.CompressionenhancementProduct code improvement that does NOT require public API changes/additions

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions