mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 00:32:11 +01:00
std/xxhash32: add SIMD comment
This commit is contained in:
1 parent
be2eb64a51
commit
5336b511e0
2 files changed
+10
No files matched your search
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user