std/xxhash32: add SIMD comment

This commit is contained in:
Nigel Tao committed 2023-10-06 14:19:48 +11:00
1 parent be2eb64a51
commit 5336b511e0
2 files changed
+10

No files matched your search

+6
View File
@@ -49,8 +49,14 @@ pub func hasher.update!(x: roslice base.u8) {
this.v1 = INITIAL_V1
this.v2 = INITIAL_V2
this.v3 = INITIAL_V3
// In theory, we could "choose up" here to pick SIMD versions. In
// practice, non-SIMD versions are faster (and simpler). For example,
// see commit b9b28dbe "std/xxhash32: add hasher.up_x86_sse42".
}
// Slicing at 0x100_0000 is arbitrary but ensures that the subslice's
// length (used in hasher.up) doesn't overflow a u32.
while args.x.length() > 0 {
remaining = args.x[.. 0]
if args.x.length() > 0x100_0000 {
+4
View File
@@ -48,6 +48,10 @@ pub func hasher.update!(x: roslice base.u8) {
this.v1 = INITIAL_V1
this.v2 = INITIAL_V2
this.v3 = INITIAL_V3
// In theory, we could "choose up" here to pick SIMD versions. In
// practice, non-SIMD versions are faster (and simpler). For example,
// see commit b9b28dbe "std/xxhash32: add hasher.up_x86_sse42".
}
this.up!(x: args.x)