Skip to content
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

Optimize varint reading for Intel using intrinsics #102

Merged
merged 1 commit into from
Dec 1, 2024

Conversation

brantburnett
Copy link
Owner

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
DefaultJob : .NET 9.0.0 (9.0.24.52809), X64 RyuJIT AVX2

Method Value Mean Error StdDev Ratio RatioSD Rank
Previous 0 3.881 ns 0.0541 ns 0.0506 ns 1.00 0.02 2
New 0 3.626 ns 0.0312 ns 0.0291 ns 0.93 0.01 1
Previous 256 4.161 ns 0.0096 ns 0.0085 ns 1.00 0.00 2
New 256 3.596 ns 0.0076 ns 0.0067 ns 0.86 0.00 1
Previous 65536 4.760 ns 0.0103 ns 0.0096 ns 1.00 0.00 2
New 65536 3.417 ns 0.0087 ns 0.0081 ns 0.72 0.00 1

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
  DefaultJob : .NET 9.0.0 (9.0.24.52809), X64 RyuJIT AVX2

| Method   | Value | Mean     | Error     | StdDev    | Ratio | RatioSD | Rank |
|--------- |------ |---------:|----------:|----------:|------:|--------:|-----:|
| Previous | 0     | 3.881 ns | 0.0541 ns | 0.0506 ns |  1.00 |    0.02 |    2 |
| New      | 0     | 3.626 ns | 0.0312 ns | 0.0291 ns |  0.93 |    0.01 |    1 |
|          |       |          |           |           |       |         |      |
| Previous | 256   | 4.161 ns | 0.0096 ns | 0.0085 ns |  1.00 |    0.00 |    2 |
| New      | 256   | 3.596 ns | 0.0076 ns | 0.0067 ns |  0.86 |    0.00 |    1 |
|          |       |          |           |           |       |         |      |
| Previous | 65536 | 4.760 ns | 0.0103 ns | 0.0096 ns |  1.00 |    0.00 |    2 |
| New      | 65536 | 3.417 ns | 0.0087 ns | 0.0081 ns |  0.72 |    0.00 |    1 |
@brantburnett brantburnett merged commit ef0eb1e into main Dec 1, 2024
28 checks passed
@brantburnett brantburnett deleted the varintdecoding branch December 1, 2024 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant