Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle null chunk type using enum value (#83)
Motivation ---------- Trying to narrow down perf loss in .NET 8 compared to .NET 6 specific to stream decompression. Modifications ------------- Rather than using a `Nullable<ChunkType>` to track when the chunk type is unknown, add an enum value that represents null. Results ------- BenchmarkDotNet v0.13.10, Windows 11 (10.0.22621.2861/22H2/2022Update/SunValley2) 12th Gen Intel Core i7-1270P, 1 CPU, 16 logical and 12 physical cores .NET SDK 8.0.100 [Host] : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2 Job-AODULB : .NET Framework 4.8.1 (4.8.9181.0), X64 RyuJIT VectorSize=256 Job-AZPVRO : .NET Framework 4.8.1 (4.8.9181.0), X64 RyuJIT VectorSize=256 Job-FTJSLO : .NET 6.0.25 (6.0.2523.51912), X64 RyuJIT AVX2 Job-XMQQAK : .NET 6.0.25 (6.0.2523.51912), X64 RyuJIT AVX2 Job-IPTUCK : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2 Job-YAGJLP : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2 Job-DJZUQL : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2 Job-FFPERJ : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2 | Method | Runtime | BuildConfiguration | PGO | ReadSize | Mean | Error | StdDev | Ratio | Rank | |----------- |------------------- |------------------- |---- |--------- |---------:|--------:|--------:|------:|-----:| | Decompress | .NET Framework 4.8 | Previous | N | 16384 | 340.4 us | 2.56 us | 2.39 us | 1.00 | 2 | | Decompress | .NET Framework 4.8 | Default | N | 16384 | 332.2 us | 2.64 us | 2.34 us | 0.98 | 1 | | | | | | | | | | | | | Decompress | .NET 6.0 | Previous | N | 16384 | 167.5 us | 1.11 us | 1.04 us | 1.00 | 1 | | Decompress | .NET 6.0 | Default | N | 16384 | 167.5 us | 2.44 us | 2.16 us | 1.00 | 1 | | | | | | | | | | | | | Decompress | .NET 8.0 | Previous | N | 16384 | 200.7 us | 1.19 us | 1.06 us | 1.00 | 2 | | Decompress | .NET 8.0 | Default | N | 16384 | 191.7 us | 1.47 us | 1.30 us | 0.96 | 1 | | | | | | | | | | | | | Decompress | .NET 8.0 | Previous | Y | 16384 | 199.1 us | 0.94 us | 0.88 us | 1.00 | 2 | | Decompress | .NET 8.0 | Default | Y | 16384 | 189.9 us | 0.91 us | 0.85 us | 0.95 | 1 | Note: Benchmarks include other improvements since 1.1.3
- Loading branch information