Skip to content

Commit 88f0be8

Browse files
authored
Optimize Murmur Hash 1 implementation
Signed-off-by: Xen <lordofxen@deskasoft.com>
1 parent e0d12d7 commit 88f0be8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

HashifyNet/Algorithms/MurmurHash/MurmurHash1_Implementation.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ protected override IHashValue ComputeHashInternal(ReadOnlySpan<byte> data, Cance
7676

7777
for (var currentOffset = 0; currentOffset < groupEndOffset; currentOffset += 4)
7878
{
79-
hashValue += Endianness.ToUInt32LittleEndian(data, currentOffset);
79+
hashValue += Endianness.ToUInt32LittleEndian(data.Slice(currentOffset));
8080
hashValue *= _m;
8181
hashValue ^= hashValue >> 16;
8282
}
@@ -113,4 +113,4 @@ protected override IHashValue ComputeHashInternal(ReadOnlySpan<byte> data, Cance
113113
32);
114114
}
115115
}
116-
}
116+
}

0 commit comments

Comments
 (0)