Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
olmelnyk committed Jun 13, 2022
1 parent fd21646 commit 30d23c4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# 2022-06-13
- Added xxHash3
# 2022-06-05
- Added SIMD support for xxHash128
- Inlined all method calls for xxHash128
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ Runtime=.NET 6.0
```

| Method | x64 |
|:---------------|----------:|
|:---------------|-----------:|
| Hash32 Array | 5.87 GB/s |
| Hash64 Array | 9.07 GB/s |
| Hash128 Array | 12.04 GB/s |
| Hash3 Array | 12.08 GB/s |
| Hash32 Span | 5.87 GB/s |
| Hash64 Span | 9.07 GB/s |
| Hash128 Span | 12.04 GB/s |
| Hash3 Span | 12.08 GB/s |
| Hash32 Stream | 3.22 GB/s |
| Hash64 Stream | 4.81 GB/s |

Expand All @@ -55,6 +57,8 @@ Runtime=.NET 6.0
| Hash64 | x64 | C | 74.2 ns | 64.8 us | 83.0 ms | 12.04 GB/s |
| Hash128 (SSE2/AVX2)| x64 | C# | 151.6 ns | 64.5 us | 80.5 ms | 12.04 GB/s |
| Hash128 (SSE2/AVX2)| x64 | C | 84.4 ns | 38.3 us | 57.4 ms | 17.42 GB/s |
| Hash3 (SSE2/AVX2)| x64 | C# | 77.6 ns | 62.1 us | 78.5 ms | 12.08 GB/s |
| Hash3 (SSE2/AVX2)| x64 | C | 73.7 ns | 42.2 us | 59.8 ms | 16.72 GB/s |


## Api
Expand Down Expand Up @@ -102,6 +106,11 @@ uint h32_4 = xxHash32.ComputeHash(new MemoryStream(data));
uint h32_5 = await xxHash32.ComputeHashAsync(new MemoryStream(data));
uint h32_6 = xxHash32.ComputeHash("veni vidi vici");

ulong h3_1 = xxHash3.ComputeHash(data, data.Length);
ulong h3_2 = xxHash3.ComputeHash(new Span<byte>(data), data.Length);
ulong h3_3 = xxHash3.ComputeHash(new ReadOnlySpan<byte>(data), data.Length);
ulong h3_4 = xxHash3.ComputeHash("veni vidi vici");

uint128 h128_1 = xxHash128.ComputeHash(data, data.Length);
uint128 h128_2 = xxHash128.ComputeHash(new Span<byte>(data), data.Length);
uint128 h128_3 = xxHash128.ComputeHash(new ReadOnlySpan<byte>(data), data.Length);
Expand Down
2 changes: 1 addition & 1 deletion nuget.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<PackageId>Standart.Hash.xxHash</PackageId>
<VersionPrefix>4.0.2</VersionPrefix>
<VersionPrefix>4.0.3</VersionPrefix>
<AssemblyName>Standart.Hash.xxHash</AssemblyName>
<AssemblyTitle>Standart.Hash.xxHash</AssemblyTitle>
<Authors>Oleksandr Melnyk</Authors>
Expand Down

0 comments on commit 30d23c4

Please sign in to comment.