Skip to content

Commit b3dd1f5

Browse files
authored
Optimize Spooky Hash V1 implementation
Signed-off-by: Xen <lordofxen@deskasoft.com>
1 parent c290ed2 commit b3dd1f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

HashifyNet/Algorithms/SpookyHash/SpookyHashV1_Implementation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ private static void Mix(ulong[] hashValue, ReadOnlySpan<byte> data)
381381
{
382382
for (var i = 0; i < 12; ++i)
383383
{
384-
hashValue[i] += Endianness.ToUInt64LittleEndian(data, currentOffset + (i * 8));
384+
hashValue[i] += Endianness.ToUInt64LittleEndian(data.Slice(currentOffset + (i * 8)));
385385
hashValue[(i + 2) % 12] ^= hashValue[(i + 10) % 12];
386386
hashValue[(i + 11) % 12] ^= hashValue[i];
387387
hashValue[i] = RotateLeft(hashValue[i], _MixRotationParameters[i]);

0 commit comments

Comments
 (0)