Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use VarIntEncoding.TryRead in SnappyDecompressor #104

Merged
merged 1 commit into from
Dec 1, 2024

Conversation

brantburnett
Copy link
Owner

Simplified code and shows improved performance on streaming decompression for modern frameworks.

BenchmarkDotNet v0.14.0, Windows 11 (10.0.26100.2314) Unknown processor
.NET SDK 9.0.100
[Host] : .NET 9.0.0 (9.0.24.52809), X64 RyuJIT AVX2
Job-SXYOZE : .NET Framework 4.8.1 (4.8.9282.0), X64 RyuJIT VectorSize=256
Job-YZRTRU : .NET Framework 4.8.1 (4.8.9282.0), X64 RyuJIT VectorSize=256
Job-LUMTGV : .NET 6.0.36 (6.0.3624.51421), X64 RyuJIT AVX2
Job-WIRWZO : .NET 6.0.36 (6.0.3624.51421), X64 RyuJIT AVX2
Job-CCWZUZ : .NET 8.0.11 (8.0.1124.51707), X64 RyuJIT AVX2
Job-JRBCAZ : .NET 8.0.11 (8.0.1124.51707), X64 RyuJIT AVX2
Job-AXYWAW : .NET 9.0.0 (9.0.24.52809), X64 RyuJIT AVX2
Job-RYXATQ : .NET 9.0.0 (9.0.24.52809), X64 RyuJIT AVX2

Method Runtime BuildConfiguration ReadSize Mean Error StdDev Ratio Rank
Decompress .NET Framework 4.8 Previous 16384 296.1 us 1.37 us 1.28 us 1.00 1
Decompress .NET Framework 4.8 Default 16384 288.4 us 1.22 us 1.02 us 0.97 1
Decompress .NET 6.0 Previous 16384 141.9 us 0.53 us 0.47 us 1.00 1
Decompress .NET 6.0 Default 16384 138.7 us 0.53 us 0.49 us 0.98 1
Decompress .NET 8.0 Previous 16384 159.5 us 0.40 us 0.38 us 1.00 2
Decompress .NET 8.0 Default 16384 124.5 us 0.50 us 0.47 us 0.78 1
Decompress .NET 9.0 Previous 16384 142.4 us 0.58 us 0.54 us 1.00 2
Decompress .NET 9.0 Default 16384 112.6 us 0.37 us 0.35 us 0.79 1

Simplified code and shows improved performance on streaming
decompression for modern frameworks.

BenchmarkDotNet v0.14.0, Windows 11 (10.0.26100.2314)
Unknown processor
.NET SDK 9.0.100
  [Host]     : .NET 9.0.0 (9.0.24.52809), X64 RyuJIT AVX2
  Job-SXYOZE : .NET Framework 4.8.1 (4.8.9282.0), X64 RyuJIT VectorSize=256
  Job-YZRTRU : .NET Framework 4.8.1 (4.8.9282.0), X64 RyuJIT VectorSize=256
  Job-LUMTGV : .NET 6.0.36 (6.0.3624.51421), X64 RyuJIT AVX2
  Job-WIRWZO : .NET 6.0.36 (6.0.3624.51421), X64 RyuJIT AVX2
  Job-CCWZUZ : .NET 8.0.11 (8.0.1124.51707), X64 RyuJIT AVX2
  Job-JRBCAZ : .NET 8.0.11 (8.0.1124.51707), X64 RyuJIT AVX2
  Job-AXYWAW : .NET 9.0.0 (9.0.24.52809), X64 RyuJIT AVX2
  Job-RYXATQ : .NET 9.0.0 (9.0.24.52809), X64 RyuJIT AVX2

| Method     | Runtime            | BuildConfiguration | ReadSize | Mean     | Error   | StdDev  | Ratio | Rank |
|----------- |------------------- |------------------- |--------- |---------:|--------:|--------:|------:|-----:|
| Decompress | .NET Framework 4.8 | Previous           | 16384    | 296.1 us | 1.37 us | 1.28 us |  1.00 |    1 |
| Decompress | .NET Framework 4.8 | Default            | 16384    | 288.4 us | 1.22 us | 1.02 us |  0.97 |    1 |
|            |                    |                    |          |          |         |         |       |      |
| Decompress | .NET 6.0           | Previous           | 16384    | 141.9 us | 0.53 us | 0.47 us |  1.00 |    1 |
| Decompress | .NET 6.0           | Default            | 16384    | 138.7 us | 0.53 us | 0.49 us |  0.98 |    1 |
|            |                    |                    |          |          |         |         |       |      |
| Decompress | .NET 8.0           | Previous           | 16384    | 159.5 us | 0.40 us | 0.38 us |  1.00 |    2 |
| Decompress | .NET 8.0           | Default            | 16384    | 124.5 us | 0.50 us | 0.47 us |  0.78 |    1 |
|            |                    |                    |          |          |         |         |       |      |
| Decompress | .NET 9.0           | Previous           | 16384    | 142.4 us | 0.58 us | 0.54 us |  1.00 |    2 |
| Decompress | .NET 9.0           | Default            | 16384    | 112.6 us | 0.37 us | 0.35 us |  0.79 |    1 |
@brantburnett brantburnett merged commit 712659b into main Dec 1, 2024
28 checks passed
@brantburnett brantburnett deleted the use-varintencoding-tryread branch December 1, 2024 15:27
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant