std/xxhash32: add hasher.up_x86_sse42

This commit will soon be followed by a rollback, but it is committed
anyway so that we can refer to these numbers in the git log.

name                         old speed      new speed      delta

wuffs_xxhash32_10k/clang11   7.81GB/s ± 0%  4.46GB/s ± 1%  -42.86%  (p=0.008 n=5+5)
wuffs_xxhash32_100k/clang11  7.96GB/s ± 0%  4.67GB/s ± 1%  -41.34%  (p=0.008 n=5+5)

wuffs_xxhash32_10k/gcc10     7.83GB/s ± 0%  4.48GB/s ± 2%  -42.81%  (p=0.008 n=5+5)
wuffs_xxhash32_100k/gcc10    7.95GB/s ± 0%  4.69GB/s ± 2%  -41.04%  (p=0.008 n=5+5)

mimic_xxhash32_10k           7.70GB/s ± 1%  7.73GB/s ± 1%     ~     (p=0.421 n=5+5)
mimic_xxhash32_100k          7.79GB/s ± 0%  7.84GB/s ± 1%     ~     (p=0.730 n=4+5)
This commit is contained in:
Nigel Tao committed 2023-10-06 13:59:31 +11:00
1 parent 1304ee6265
commit b9b28dbe8b
4 files changed
+262 -1

No files matched your search

+6 -1
View File
@@ -49,6 +49,9 @@ pub func hasher.update!(x: roslice base.u8) {
this.v1 = INITIAL_V1
this.v2 = INITIAL_V2
this.v3 = INITIAL_V3
choose up = [
up_x86_sse42]
}
while args.x.length() > 0 {
@@ -69,7 +72,9 @@ pub func hasher.update_u32!(x: roslice base.u8) base.u32 {
return this.checksum_u32()
}
pri func hasher.up!(x: roslice base.u8) {
pri func hasher.up!(x: roslice base.u8),
choosy,
{
var new_lmu : base.u32
var buf_u32 : base.u32
var buf_len : base.u32[..= 15]