Skip to content

Commit

Permalink
add rust FxHash results
Browse files Browse the repository at this point in the history
unseeded and very poor. collisions everywhere
  • Loading branch information
rurban committed Sep 16, 2023
1 parent 934ad1a commit 7454c1f
Show file tree
Hide file tree
Showing 4 changed files with 630 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ SMhasher
| [asconhashv12_64](doc/asconhashv12_64.txt) | 159.68 | 386.90 | 480.86 (4) |6490 | |
| [sha3-256](doc/sha3-256.txt) | 100.58 | 3877.18 |4159.79 (37)| | PerlinNoise |
| [sha3-256_64](doc/sha3-256_64.txt) | 100.57 | 3909.00 |4174.63 (16)| | PerlinNoise |
| [FxHash32](doc/FxHash32.txt) | 3080.54 | 29.35 | 401.61 (2) | | rust, fixed seed |
| [FxHash64](doc/FxHash64.txt) | 0.00 | 0.00 | 0.00 (0) | | rust, fixed seed |
| [FxHash32](doc/FxHash32.txt) | 3080.54 | 29.35 | 401.61 (2) | | rust, fixed seed, fails all tests |
| [FxHash64](doc/FxHash64.txt) | 6140.18 | 24.03 | 397.79 (14)| | rust, fixed seed, fails all tests |
| [hasshe2](doc/hasshe2.txt) | 2773.89 | 64.35 | 282.30 (3) | 445 | Permutation,TwoBytes,Zeroes,Seed|
| [poly_1_mersenne](doc/poly_1_mersenne.txt) | 1369.21 | 61.59 | 248.86 (4) | 479 | fails most tests |
| [poly_2_mersenne](doc/poly_2_mersenne.txt) | 1364.03 | 70.30 | 261.00 (6) | 479 | |
Expand Down
108 changes: 108 additions & 0 deletions doc/FxHash32.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
-------------------------------------------------------------------------------
--- Testing FxHash32 "FxHash (FireFox hash) with 32 bits (crate `fxhash`)" GOOD

[[[ Sanity Tests ]]]

Verification value 0xBBE55FD6 ....... PASS
Running sanity check 1 .......... PASS
Running AppendedZeroesTest .......... PASS

[[[ Speed Tests ]]]

Bulk speed test - 262144-byte keys
Alignment 7 - 1.077 bytes/cycle - 3080.54 MiB/sec @ 3 ghz
Alignment 6 - 1.077 bytes/cycle - 3080.49 MiB/sec @ 3 ghz
Alignment 5 - 1.077 bytes/cycle - 3080.48 MiB/sec @ 3 ghz
Alignment 4 - 1.077 bytes/cycle - 3080.61 MiB/sec @ 3 ghz
Alignment 3 - 1.077 bytes/cycle - 3080.54 MiB/sec @ 3 ghz
Alignment 2 - 1.077 bytes/cycle - 3080.54 MiB/sec @ 3 ghz
Alignment 1 - 1.077 bytes/cycle - 3080.54 MiB/sec @ 3 ghz
Alignment 0 - 1.077 bytes/cycle - 3080.61 MiB/sec @ 3 ghz
Average - 1.077 bytes/cycle - 3080.54 MiB/sec @ 3 ghz

Small key speed test - 1-byte keys - 13.00 cycles/hash
Small key speed test - 2-byte keys - 17.00 cycles/hash
Small key speed test - 3-byte keys - 21.00 cycles/hash
Small key speed test - 4-byte keys - 14.00 cycles/hash
Small key speed test - 5-byte keys - 18.00 cycles/hash
Small key speed test - 6-byte keys - 22.00 cycles/hash
Small key speed test - 7-byte keys - 25.79 cycles/hash
Small key speed test - 8-byte keys - 18.00 cycles/hash
Small key speed test - 9-byte keys - 22.00 cycles/hash
Small key speed test - 10-byte keys - 26.00 cycles/hash
Small key speed test - 11-byte keys - 29.76 cycles/hash
Small key speed test - 12-byte keys - 21.00 cycles/hash
Small key speed test - 13-byte keys - 25.00 cycles/hash
Small key speed test - 14-byte keys - 29.88 cycles/hash
Small key speed test - 15-byte keys - 33.00 cycles/hash
Small key speed test - 16-byte keys - 24.00 cycles/hash
Small key speed test - 17-byte keys - 28.00 cycles/hash
Small key speed test - 18-byte keys - 32.00 cycles/hash
Small key speed test - 19-byte keys - 36.00 cycles/hash
Small key speed test - 20-byte keys - 28.00 cycles/hash
Small key speed test - 21-byte keys - 32.00 cycles/hash
Small key speed test - 22-byte keys - 36.00 cycles/hash
Small key speed test - 23-byte keys - 40.00 cycles/hash
Small key speed test - 24-byte keys - 32.46 cycles/hash
Small key speed test - 25-byte keys - 36.99 cycles/hash
Small key speed test - 26-byte keys - 40.00 cycles/hash
Small key speed test - 27-byte keys - 43.00 cycles/hash
Small key speed test - 28-byte keys - 36.00 cycles/hash
Small key speed test - 29-byte keys - 40.00 cycles/hash
Small key speed test - 30-byte keys - 43.00 cycles/hash
Small key speed test - 31-byte keys - 47.00 cycles/hash
Average 29.351 cycles/hash

[[[ 'Hashmap' Speed Tests ]]]

std::unordered_map
Init std HashMapTest: 679.304 cycles/op (479826 inserts, 1% deletions)
Running std HashMapTest: 546.764 cycles/op (3.9 stdv)

greg7mdp/parallel-hashmap
Init fast HashMapTest: 804.287 cycles/op (479826 inserts, 1% deletions)
Running fast HashMapTest: 401.612 cycles/op (1.8 stdv) ....... PASS

[[[ Avalanche Tests ]]]

Testing 24-bit keys -> 32-bit hashes, 300000 reps.......... worst bias is 100.000000% !!!!!
Testing 32-bit keys -> 32-bit hashes, 300000 reps.......... worst bias is 100.000000% !!!!!
Testing 40-bit keys -> 32-bit hashes, 300000 reps.......... worst bias is 78.310000% !!!!!
Testing 48-bit keys -> 32-bit hashes, 300000 reps.......... worst bias is 5.068000% !!!!!
Testing 56-bit keys -> 32-bit hashes, 300000 reps.......... worst bias is 1.037333% !!!!!
Testing 64-bit keys -> 32-bit hashes, 300000 reps.......... worst bias is 78.310000% !!!!!
Testing 72-bit keys -> 32-bit hashes, 300000 reps.......... worst bias is 100.000000% !!!!!
Testing 80-bit keys -> 32-bit hashes, 300000 reps.......... worst bias is 0.576000%
Testing 96-bit keys -> 32-bit hashes, 300000 reps.......... worst bias is 5.015333% !!!!!
Testing 112-bit keys -> 32-bit hashes, 300000 reps.......... worst bias is 0.632667%
Testing 128-bit keys -> 32-bit hashes, 300000 reps.......... worst bias is 0.664000%
Testing 160-bit keys -> 32-bit hashes, 300000 reps.......... worst bias is 0.642667%
Testing 512-bit keys -> 32-bit hashes, 300000 reps.[[[ BadSeeds Tests ]]]

Testing 0 internal secrets:
0x0
Broken seed 0x00000000 => 0 with key[1] of all 0 bytes confirmed => hash 0 !!!!

Broken seed 0x00000000 => 0 with key[2] of all 0 bytes confirmed => hash 0 !!!!

Broken seed 0x00000000 => 0 with key[4] of all 0 bytes confirmed => hash 0 !!!!

Broken seed 0x00000000 => 0 with key[8] of all 0 bytes confirmed => hash 0 !!!!

Broken seed 0x00000000 => 0 with key[12] of all 0 bytes confirmed => hash 0 !!!!

Broken seed 0x00000000 => 0 with key[16] of all 0 bytes confirmed => hash 0 !!!!

Broken seed 0x00000000 => 0 with key[32] of all 0 bytes confirmed => hash 0 !!!!

Broken seed 0x00000000 => 0 with key[64] of all 0 bytes confirmed => hash 0 !!!!

Broken seed 0x00000000 => 0 with key[128] of all 0 bytes confirmed => hash 0 !!!!
Testing the first 0xffffffff seeds ...
4 threads starting...
at 40000000
Broken seed 0x40000000 => 0 with key[16] of all 0 bytes
at 0
Broken seed 0x00000000 => 0 with key[16] of all 0 bytes
at 80000000
Broken seed 0x80000000 => 0 with key[16] of all 0 bytes
Loading

0 comments on commit 7454c1f

Please sign in to comment.