rurban / smhasher

Hash function quality and speed tests
https://rurban.github.io/smhasher/
Other
1.86k stars 179 forks source link

Fix 32-bit and big-endian builds #290

Closed darkk closed 3 months ago

darkk commented 3 months ago

That's a few small fixes those should be easy to review.

I'm submitting them separately to shorten the next PR that'll focus on better SpeedTest reporting and MIPS32 cycle counter.

darkk commented 3 months ago

Failures are the same as they were in https://github.com/rurban/smhasher/pull/289#issuecomment-2222234036

rurban commented 3 months ago

macOS PMP_Multilinear.h:1421:6: error: no viable overloaded '+=' and windows should really be fixed somewhen...

darkk commented 3 months ago

windows should really be fixed somewhen

Speaking of... I've got 32-bit BE, 64-big BE and 32-bit LE machines and I see lots of failures. What's the best way to deal with them? I mean, I can do "my" best, but I'd like to know your opinion before submitting PR :-)

That's usual x86_64:

i7-6600U(64le)$ build/SMHasher --test=VerifyAll --verbose | awk '/Verification/ {print $7}' | sort | uniq -c
      4 INSECURE
    193 PASS
     37 SKIP

MIPS32, LE:

snr(32le)$ /tmp/SMHasher --test=VerifyAll | awk '/Verification/ {print $7}' | sort | uniq -c
      3 FAIL!
      8 INSECURE
    142 PASS
     21 SKIP

And MIPS32, Big Endian:

tp842(32be)$ /tmp/SMHasher --test=VerifyAll | awk '/Verification/ {print $7}' | sort | uniq -c 
    117 FAIL!
     10 INSECURE
     26 PASS
     19 SKIP