1.1.0
brantburnett
released this
12 Mar 13:27
·
24 commits
to main
since this release
Breaking Changes
This release no longer includes explicit support for the unsupported runtimes .NET Core 3.0/3.1 or .NET 5.0. These runtimes are now supported via the .NET Standard 2.0 target. While they should still function, it is untested and the lack of hardware intrinsic support will most likely result in degraded performance compared to 1.0.
What's Changed
- All use of GC pinning and fixed buffers has been replaced with byte references and System.Runtime.CompilerServices.Unsafe. This should have less impact on garbage collection performance, especially on systems with continuous Snappy load.
- Reduced heap allocations
- Ported some performance improvements from the reference implementation that were added since the original port
- Lots more performance tweaks
Performance
This release sees a consistent improvement in both compression and decompression performance across all supported frameworks on my Core i7-10850H CPU, especially on decompression. On .NET 6, the time was reduced by 18% when compressing 64KB of HTML and 52% when decompressing. In some cases, the decompression time is reduced by as much as 66%.
Changelog
- Add .NET 6.0 target by @brantburnett in #40
- Update CodeQL to use .NET 6 by @brantburnett in #41
- Remove support for unsupported runtimes by @brantburnett in #42
- Rename GitHub actions and run on release branches by @brantburnett in #43
- Preload Pshufb fill pattern Vector128 by @brantburnett in #44
- Make unit tests .NET 4.8 compatible by @brantburnett in #45
- Switch CopyHelpers to use ref byte instead of byte* by @brantburnett in #46
- Improve perf of UnalignedCopy64/128 by @brantburnett in #47
- Rewrite decompressor AppendXXX methods to use refs by @brantburnett in #48
- Rewrite decompressor RefillTagFromScatch method to use refs by @brantburnett in #49
- Switch decompression input and scratch to use ref byte by @brantburnett in #50
- Switch decompression buffer and op to use ref byte by @brantburnett in #51
- Move steps to decompress from scratch to a separate method by @brantburnett in #52
- Switch compression hash table from pinned ptr to ref by @brantburnett in #53
- Reduce compression heap and buffer overhead by @brantburnett in #54
- Use ref byte for compression output pointer by @brantburnett in #55
- Use ref byte for compression input pointers by @brantburnett in #56
- Switch stream decompression from pointers to spans by @brantburnett in #57
- Use ThrowHelper for all exceptions by @brantburnett in #58
- Cleanup benchmarks by @brantburnett in #59
- Allow shorter compression output buffer lengths by @brantburnett in #60
- Improve benchmark summaries by @brantburnett in #61
- Fix compression stream benchmarks by @brantburnett in #62
- Improve block benchmarks by @brantburnett in #63
- Improve speed of hash table clear by @brantburnett in #64
- Simplify PSHUFB copy logic for .NET 6/7 by @brantburnett in #65
- Use CRC32 hash when available during compression by @brantburnett in #66
- Remove some unnecessary unsafe blocks by @brantburnett in #67
- Use ArrayPool instead of MemoryPool for the lookback buffer by @brantburnett in #68
- Improve Log2Floor for legacy runtimes by @brantburnett in #69
- Optimize FindMatchLength for x64 by @brantburnett in #70
- Simplify stream decompress logic by @brantburnett in #71
- Switch several arrays to static data references by @brantburnett in #72
Full Changelog: release/1.0.0...release/1.1.0