fixed tests

This commit is contained in:
2024-01-07 20:27:18 +06:00
parent 90ad0a9f5a
commit b806cf6e18
12 changed files with 130 additions and 58 deletions

View File

@@ -36,7 +36,7 @@
{
return xxHash32.ComputeHash(data, data.Length);
}
#if NET6_0_OR_GREATER
[Benchmark]
public uint Hash32_Span()
{
@@ -50,7 +50,7 @@
ReadOnlySpan<byte> span = new ReadOnlySpan<byte>(data);
return xxHash32.ComputeHash(span, span.Length);
}
#endif
[Benchmark]
public uint Hash32_Stream()
{
@@ -70,7 +70,7 @@
{
return xxHash64.ComputeHash(data, data.Length);
}
#if NET6_0_OR_GREATER
[Benchmark]
public ulong Hash64_Span()
{
@@ -84,6 +84,7 @@
ReadOnlySpan<byte> span = new ReadOnlySpan<byte>(data);
return xxHash64.ComputeHash(span, span.Length);
}
#endif
[Benchmark]
public ulong Hash64_Stream()