Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
3b78dd9
Add XxHash128
xoofx Nov 5, 2022
c6bf653
Merge branch 'main' into add-xxhash128
xoofx Nov 5, 2022
548c2e8
Optimize XxHash128
xoofx Nov 5, 2022
4c449c0
Missing optimization
xoofx Nov 5, 2022
5a19745
Fix warnings
xoofx Nov 5, 2022
7b916f1
Optimize the 129 To 240 bytes case
xoofx Nov 5, 2022
645dc0e
Fix warnings
xoofx Nov 5, 2022
28cf734
Add missing namespace for tests
xoofx Nov 5, 2022
76d86cc
Split strings in XxHash128 test
xoofx Nov 5, 2022
08f670e
Try to fix tests on CI
xoofx Nov 5, 2022
6f722a5
Add XxHash128 to ref
xoofx Nov 6, 2022
5c1c2a7
Fix compilation errors on non .NET 7 platforms
xoofx Nov 6, 2022
ce89e5c
Fix compilation errors on net472
xoofx Nov 6, 2022
dc4a906
Update src/libraries/System.IO.Hashing/tests/XxHash64Tests.cs
xoofx Nov 12, 2022
75fc262
Update src/libraries/System.IO.Hashing/tests/XxHash3Tests.cs
xoofx Nov 12, 2022
ea57cfc
Update src/libraries/System.IO.Hashing/tests/XxHash128Tests.cs
xoofx Nov 12, 2022
5eb308a
Update src/libraries/System.IO.Hashing/src/System/IO/Hashing/XxHashSh…
xoofx Nov 12, 2022
6ed008f
Update src/libraries/System.IO.Hashing/src/System/IO/Hashing/XxHash12…
xoofx Nov 12, 2022
6f04fb5
Update src/libraries/System.IO.Hashing/src/System/IO/Hashing/XxHash12…
xoofx Nov 12, 2022
1989791
Update src/libraries/System.IO.Hashing/src/System/IO/Hashing/XxHash12…
xoofx Nov 12, 2022
37b7046
Update src/libraries/System.IO.Hashing/src/System/IO/Hashing/XxHash3.cs
xoofx Nov 12, 2022
160b820
Update src/libraries/System.IO.Hashing/src/System/IO/Hashing/XxHash3.cs
xoofx Nov 12, 2022
8b4830b
Update src/libraries/System.IO.Hashing/src/System/IO/Hashing/XxHash3.cs
xoofx Nov 12, 2022
35feef1
Update src/libraries/System.IO.Hashing/src/System/IO/Hashing/XxHash3.cs
xoofx Nov 12, 2022
fde336f
Update src/libraries/System.IO.Hashing/src/System/IO/Hashing/XxHash3.cs
xoofx Nov 12, 2022
436dd3f
Update src/libraries/System.IO.Hashing/src/System/IO/Hashing/XxHash3.cs
xoofx Nov 12, 2022
91ce914
Update src/libraries/System.IO.Hashing/src/System/IO/Hashing/XxHash12…
xoofx Nov 12, 2022
5692d84
Update src/libraries/System.IO.Hashing/src/System/IO/Hashing/XxHash12…
xoofx Nov 12, 2022
9589abd
Update src/libraries/System.IO.Hashing/src/System/IO/Hashing/XxHash12…
xoofx Nov 12, 2022
f82d2d6
Fix usage of var
xoofx Nov 12, 2022
18ab499
Fix comment XXH3 -> XXH128
xoofx Nov 12, 2022
5e3db07
Rename WriteCanonical128 to WriteBigEndian128
xoofx Nov 12, 2022
b0fe876
Fix remaining issues
xoofx Nov 12, 2022
f4f5d08
Merge branch 'main' into add-xxhash128
xoofx Nov 12, 2022
b6452b0
Add tests for XxHash128.HashToUInt128 and GetCurrentHashAsUInt128
xoofx Nov 12, 2022
02c8eb7
Remove spaces
xoofx Nov 12, 2022
dbcd877
Add new methods to ref
xoofx Nov 12, 2022
fe37c28
Try to fix ref file
xoofx Nov 12, 2022
3513d77
Fix ref for .NET 7
xoofx Nov 12, 2022
7c21a47
Split ref files
xoofx Nov 17, 2022
7fb2234
Merge remote-tracking branch 'origin/main' into add-xxhash128
xoofx Nov 17, 2022
5061e3c
Fix ref after merge
xoofx Nov 17, 2022
6a8102f
Update src/libraries/System.IO.Hashing/ref/System.IO.Hashing.netcorea…
xoofx Dec 1, 2022
63f2d9f
Update src/libraries/System.IO.Hashing/src/System/IO/Hashing/XxHash12…
xoofx Dec 1, 2022
0599ba4
Remove System.Linq
xoofx Dec 1, 2022
4505e57
Use PascalCast for local const
xoofx Dec 1, 2022
af4cb41
Remove XorShift64 from XxHash128
xoofx Dec 1, 2022
620ef11
Remove duplicated Multiply32To64
xoofx Dec 1, 2022
74eaced
Improve HashLength129To240
xoofx Dec 1, 2022
d4a9c9a
Reverting System.Linq for XxHash3 and XxHash128
xoofx Dec 1, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update src/libraries/System.IO.Hashing/src/System/IO/Hashing/XxHash3.cs
Co-authored-by: Stephen Toub <stoub@microsoft.com>
  • Loading branch information
xoofx and stephentoub authored Nov 12, 2022
commit 35feef1daf948044029d2addb7b2642d8bb4a75d
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,10 @@ private static ulong HashLength9To16(byte* source, uint length, ulong seed)
{
Debug.Assert(length >= 9 && length <= 16);

const ulong secretXorL = DefaultSecretUInt64_3 ^ DefaultSecretUInt64_4;
const ulong secretXorR = DefaultSecretUInt64_5 ^ DefaultSecretUInt64_6;
ulong bitflipLow = secretXorL + seed;
ulong bitflipHigh = secretXorR - seed;
const ulong SecretXorL = DefaultSecretUInt64_3 ^ DefaultSecretUInt64_4;
const ulong SecretXorR = DefaultSecretUInt64_5 ^ DefaultSecretUInt64_6;
ulong bitflipLow = SecretXorL + seed;
ulong bitflipHigh = SecretXorR - seed;

ulong inputLow = ReadUInt64LE(source) ^ bitflipLow;
ulong inputHigh = ReadUInt64LE(source + length - sizeof(ulong)) ^ bitflipHigh;
Expand Down