Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switching to GxHash? #487

Open
ogxd opened this issue Dec 6, 2023 · 9 comments
Open

Switching to GxHash? #487

ogxd opened this issue Dec 6, 2023 · 9 comments

Comments

@ogxd
Copy link

ogxd commented Dec 6, 2023

Context

GxHash is a new non-cryptographic hashing algorithm that outperforms all counterparts (of the same class, fxhash is slightly faster for tiny inputs but at the cost of much worse distribution/avalanche/collision) for all input sizes on both ARM and X86.

GxHash uses AES instrinsics for efficient bit mixing (like ahash does) but makes more extensive use of SIMD operations and ILP. This enables gxhash to have a much smaller bytecode than ahash (it is much simpler) while being faster. GxHash hashes are stable across ARM/X86/X86+AVX2 and the algorithm passes all SMHasher tests (ahash does not, at least on my ARM MacBook).

Benchmark

I ran the benchmarks with gxhash on my ARM MacBook m1 pro and here are the results (using GxHash 2.2.4)

test lookup_std_highbits          ... bench:       8,965 ns/iter (+/- 75)
test lookup_ahash_highbits        ... bench:       4,079 ns/iter (+/- 79)
test lookup_gxhash_highbits       ... bench:       2,976 ns/iter (+/- 78)

test lookup_std_random            ... bench:       9,033 ns/iter (+/- 183)
test lookup_ahash_random          ... bench:       4,245 ns/iter (+/- 57)
test lookup_gxhash_random         ... bench:       3,043 ns/iter (+/- 22)

test lookup_std_serial            ... bench:       8,949 ns/iter (+/- 207)
test lookup_fail_ahash_serial     ... bench:       4,419 ns/iter (+/- 78)
test lookup_gxhash_serial         ... bench:       2,669 ns/iter (+/- 29)

From these results there is about +25/30% performance on lookup from using gxhash compared to ahash. This is using gxhash 2.2.4, but gxhash 3.0.0 is almost ready and performs even better. It would be interesting also to see that we benchmark results look like on other platforms.

I am joining a PR to this issue so that you can test it.

Todo?

GxHash security properties haven't been assessed yet, but given what was said in this issue, I was thinking that a solution for even faster hashing would be welcome.

There are probably a few things to address before gxhash can be considered as a default hasher (portability, no std, ...?) but I would like to get your opinion on this idea first.

@CryZe
Copy link
Contributor

CryZe commented Dec 6, 2023

It seems like as of right now gxhash is still unsound, not checking for AES either at compile time or runtime. There also is no fallback to support any other platform. Though for initial experimentation it's probably fine, the latter at least, not sure about the unsoundness.

@Amanieu
Copy link
Member

Amanieu commented Dec 6, 2023

I previously looked at the code of GxHash and it seems to be well-optimized for throughput (# of bytes hashed per second). Unfortunately in the case of hash tables what you really want is a low-latency hash function: keys are often just a u32 and you want to go from hashing the key to fetching a cacheline in the table in as few cycles as possible. This is why hashers like FxHash and AHash perform so well: when the key is just an integer, they compile down to a handful of instructions (some shifts & one multiply).

I ran your benchmarks from #488 on my system (Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz) and the results confirm my suspicions about throughput vs latency. I'm not sure why your results are so different, perhaps there is something different with the ARM implementation.

test lookup_ahash_highbits        ... bench:       4,611 ns/iter (+/- 622)
test lookup_ahash_random          ... bench:       4,663 ns/iter (+/- 627)
test lookup_ahash_serial          ... bench:       4,277 ns/iter (+/- 463)
test lookup_fail_ahash_highbits   ... bench:       4,562 ns/iter (+/- 201)
test lookup_fail_ahash_random     ... bench:       4,814 ns/iter (+/- 1,770)
test lookup_fail_ahash_serial     ... bench:       4,174 ns/iter (+/- 410)
test lookup_fail_gxhash_highbits  ... bench:      10,997 ns/iter (+/- 400)
test lookup_fail_gxhash_random    ... bench:      13,869 ns/iter (+/- 4,052)
test lookup_fail_gxhash_serial    ... bench:      10,728 ns/iter (+/- 524)
test lookup_gxhash_highbits       ... bench:      10,019 ns/iter (+/- 211)
test lookup_gxhash_random         ... bench:      10,177 ns/iter (+/- 3,368)
test lookup_gxhash_serial         ... bench:       9,761 ns/iter (+/- 324)

@ogxd
Copy link
Author

ogxd commented Dec 6, 2023

Thanks for your feedback! Unsoundness/fallback are definitely necessary. It will take some time but it can be done since it has been done for ahash.

keys are often just a u32

Yes indeed, although not exclusively. I do not know why it performs worse on your i7 CPU but I'll investigate. It's very likely that the specialized write_u32 (and friends) allows for more straightforward hashing for small inputs. gxhash currently does not leverage this opportunity, I'll see if I can strip a few instructions by implementing write_u32 explicitly. Otherwise, maybe it can have a completely different approach for such inputs, like ahash does, to have the best of both worlds (low latency for small inputs and high throughput for larger ones)

If you're open for at least "initial experimentation", I'll try to cover these first points and update this issue.

@Amanieu
Copy link
Member

Amanieu commented Dec 6, 2023

I also tested this on an ARM system (Cortex-A72), which gives similar results to my i7 system.

test lookup_ahash_highbits        ... bench:      29,895 ns/iter (+/- 91)
test lookup_ahash_random          ... bench:      23,467 ns/iter (+/- 79)
test lookup_ahash_serial          ... bench:      26,461 ns/iter (+/- 23)
test lookup_fail_ahash_highbits   ... bench:      20,015 ns/iter (+/- 25)
test lookup_fail_ahash_random     ... bench:      21,307 ns/iter (+/- 18)
test lookup_fail_ahash_serial     ... bench:      19,055 ns/iter (+/- 65)
test lookup_gxhash_highbits       ... bench:      88,452 ns/iter (+/- 104)
test lookup_gxhash_random         ... bench:      90,223 ns/iter (+/- 87)
test lookup_gxhash_serial         ... bench:      87,281 ns/iter (+/- 105)
test lookup_fail_gxhash_highbits  ... bench:      85,329 ns/iter (+/- 141)
test lookup_fail_gxhash_random    ... bench:      82,797 ns/iter (+/- 202)
test lookup_fail_gxhash_serial    ... bench:      81,838 ns/iter (+/- 168)

@ogxd
Copy link
Author

ogxd commented Dec 6, 2023

Interesting. That may be due to the current implementation being bottlenecked on memory reads while it's less of a problem on the Apple M1 SoC which has very fast memory access. That's just a theory but as you said the GxHash Hasher has to handle u32 and other primitives differently than non Sized inputs. Otherwise, it's doing too many unnecessary operations.

@3tieto
Copy link

3tieto commented Dec 12, 2023

I runed a benchmark on my Apple M2 Max
this is report criterion.zip

❯ cargo build --benches --release --keep-going
cargo bench --no-fail-fast

    Finished release [optimized] target(s) in 0.04s
    Finished bench [optimized] target(s) in 0.03s
     Running unittests src/lib.rs (target/release/deps/gxhash-36754bfc52b5da73)

running 21 tests
test gxhash::tests::add_zeroes_mutates_hash ... ignored
test gxhash::tests::all_blocks_are_consumed ... ignored
test gxhash::tests::does_not_hash_outside_of_bounds ... ignored
test gxhash::tests::hash_of_zero_is_not_zero ... ignored
test gxhash::tests::is_stable ... ignored
test gxhash::tests::test_collisions_bits::case_01 ... ignored
test gxhash::tests::test_collisions_bits::case_02 ... ignored
test gxhash::tests::test_collisions_bits::case_03 ... ignored
test gxhash::tests::test_collisions_bits::case_04 ... ignored
test gxhash::tests::test_collisions_bits::case_05 ... ignored
test gxhash::tests::test_collisions_bits::case_06 ... ignored
test gxhash::tests::test_collisions_bits::case_07 ... ignored
test gxhash::tests::test_collisions_bits::case_08 ... ignored
test gxhash::tests::test_collisions_bits::case_09 ... ignored
test gxhash::tests::test_collisions_bits::case_10 ... ignored
test gxhash::tests::test_collisions_bits::case_11 ... ignored
test hasher::tests::default_gxhasherbuilder_is_randomly_seeded ... ignored
test hasher::tests::gxhasherbuilder_builds_same_hashers ... ignored
test hasher::tests::gxhashset_uses_default_gxhasherbuilder ... ignored
test hasher::tests::hasher_handles_empty_inputs ... ignored
test hasher::tests::hasher_produces_stable_hashes ... ignored

test result: ok. 0 passed; 0 failed; 21 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running benches/hashset.rs (target/release/deps/hashset-f3deef71202ebc34)
Gnuplot not found, using plotters backend
Benchmarking HashSet/u32/Default Hasher: Collecting 100 samples in estimated 5.0000 s (783M it
HashSet/u32/Default Hasher
                        time:   [6.3243 ns 6.4402 ns 6.5751 ns]
                        change: [+1.1141% +3.0901% +5.2606%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 4 outliers among 100 measurements (4.00%)
  4 (4.00%) high mild
Benchmarking HashSet/u32/GxHash: Collecting 100 samples in estimated 5.0000 s (3.7B iterations
HashSet/u32/GxHash      time:   [1.3411 ns 1.3441 ns 1.3472 ns]
HashSet/u32/AHash       time:   [2.4856 ns 2.4919 ns 2.4982 ns]
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) high mild
Benchmarking HashSet/u32/XxHash: Collecting 100 samples in estimated 5.0001 s (171M iterations
HashSet/u32/XxHash      time:   [29.032 ns 29.097 ns 29.173 ns]
Benchmarking HashSet/u32/FNV-1a: Collecting 100 samples in estimated 5.0000 s (3.4B iterations
HashSet/u32/FNV-1a      time:   [1.4412 ns 1.4445 ns 1.4479 ns]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild

Benchmarking HashSet/u64/Default Hasher: Collecting 100 samples in estimated 5.0001 s (366M it
HashSet/u64/Default Hasher
                        time:   [12.736 ns 13.549 ns 14.351 ns]
Benchmarking HashSet/u64/GxHash: Collecting 100 samples in estimated 5.0000 s (3.7B iterations
HashSet/u64/GxHash      time:   [1.3368 ns 1.3403 ns 1.3440 ns]
HashSet/u64/AHash       time:   [2.4819 ns 2.4892 ns 2.4971 ns]
Benchmarking HashSet/u64/XxHash: Collecting 100 samples in estimated 5.0001 s (176M iterations
HashSet/u64/XxHash      time:   [28.207 ns 28.268 ns 28.336 ns]
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) high mild
Benchmarking HashSet/u64/FNV-1a: Collecting 100 samples in estimated 5.0000 s (2.0B iterations
HashSet/u64/FNV-1a      time:   [2.5038 ns 2.5081 ns 2.5123 ns]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild

Benchmarking HashSet/u128/Default Hasher: Collecting 100 samples in estimated 5.0000 s (487M i
HashSet/u128/Default Hasher
                        time:   [9.8959 ns 10.174 ns 10.466 ns]
Benchmarking HashSet/u128/GxHash: Collecting 100 samples in estimated 5.0000 s (3.7B iteration
HashSet/u128/GxHash     time:   [1.3389 ns 1.3423 ns 1.3459 ns]
Benchmarking HashSet/u128/AHash: Collecting 100 samples in estimated 5.0000 s (2.0B iterations
HashSet/u128/AHash      time:   [2.5266 ns 2.5321 ns 2.5384 ns]
Benchmarking HashSet/u128/XxHash: Collecting 100 samples in estimated 5.0001 s (144M iteration
HashSet/u128/XxHash     time:   [34.658 ns 34.857 ns 35.081 ns]
Found 6 outliers among 100 measurements (6.00%)
  5 (5.00%) high mild
  1 (1.00%) high severe
Benchmarking HashSet/u128/FNV-1a: Collecting 100 samples in estimated 5.0000 s (908M iteration
HashSet/u128/FNV-1a     time:   [5.4693 ns 5.4820 ns 5.4958 ns]

Benchmarking HashSet/small string/Default Hasher: Collecting 100 samples in estimated 5.0000 s
HashSet/small string/Default Hasher
                        time:   [7.2488 ns 7.2729 ns 7.2993 ns]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild
Benchmarking HashSet/small string/GxHash: Collecting 100 samples in estimated 5.0000 s (1.7B i
HashSet/small string/GxHash
                        time:   [2.9709 ns 2.9780 ns 2.9858 ns]
Benchmarking HashSet/small string/AHash: Collecting 100 samples in estimated 5.0000 s (1.1B it
HashSet/small string/AHash
                        time:   [4.5359 ns 4.5488 ns 4.5625 ns]
Found 3 outliers among 100 measurements (3.00%)
  3 (3.00%) high mild
Benchmarking HashSet/small string/XxHash: Collecting 100 samples in estimated 5.0001 s (151M i
HashSet/small string/XxHash
                        time:   [32.986 ns 33.066 ns 33.152 ns]
Benchmarking HashSet/small string/FNV-1a: Collecting 100 samples in estimated 5.0000 s (1.5B i
HashSet/small string/FNV-1a
                        time:   [3.2671 ns 3.2773 ns 3.2891 ns]
Found 2 outliers among 100 measurements (2.00%)
  1 (1.00%) high mild
  1 (1.00%) high severe

Benchmarking HashSet/medium string/Default Hasher: Collecting 100 samples in estimated 5.0000
HashSet/medium string/Default Hasher
                        time:   [10.925 ns 10.951 ns 10.978 ns]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high severe
Benchmarking HashSet/medium string/GxHash: Collecting 100 samples in estimated 5.0000 s (1.4B
HashSet/medium string/GxHash
                        time:   [3.5300 ns 3.5409 ns 3.5523 ns]
Benchmarking HashSet/medium string/AHash: Collecting 100 samples in estimated 5.0000 s (900M i
HashSet/medium string/AHash
                        time:   [5.5379 ns 5.5530 ns 5.5687 ns]
Benchmarking HashSet/medium string/XxHash: Collecting 100 samples in estimated 5.0001 s (139M
HashSet/medium string/XxHash
                        time:   [35.827 ns 35.973 ns 36.141 ns]
Found 4 outliers among 100 measurements (4.00%)
  3 (3.00%) high mild
  1 (1.00%) high severe
Benchmarking HashSet/medium string/FNV-1a: Collecting 100 samples in estimated 5.0000 s (320M
HashSet/medium string/FNV-1a
                        time:   [15.444 ns 15.483 ns 15.523 ns]

Benchmarking HashSet/large string/Default Hasher: Collecting 100 samples in estimated 5.0003 s
HashSet/large string/Default Hasher
                        time:   [112.14 ns 112.47 ns 112.85 ns]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild
Benchmarking HashSet/large string/GxHash: Collecting 100 samples in estimated 5.0000 s (519M i
HashSet/large string/GxHash
                        time:   [9.6646 ns 9.6892 ns 9.7133 ns]
Benchmarking HashSet/large string/AHash: Collecting 100 samples in estimated 5.0000 s (116M it
HashSet/large string/AHash
                        time:   [42.666 ns 42.769 ns 42.874 ns]
Found 6 outliers among 100 measurements (6.00%)
  1 (1.00%) low mild
  4 (4.00%) high mild
  1 (1.00%) high severe
Benchmarking HashSet/large string/XxHash: Collecting 100 samples in estimated 5.0001 s (74M it
HashSet/large string/XxHash
                        time:   [67.117 ns 67.311 ns 67.514 ns]
Benchmarking HashSet/large string/FNV-1a: Collecting 100 samples in estimated 5.0009 s (11M it
HashSet/large string/FNV-1a
                        time:   [449.40 ns 450.61 ns 451.89 ns]
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) high mild

Benchmarking HashSet/huge string/Default Hasher: Collecting 100 samples in estimated 5.0006 s
HashSet/huge string/Default Hasher
                        time:   [297.29 ns 298.18 ns 299.06 ns]
Found 3 outliers among 100 measurements (3.00%)
  2 (2.00%) high mild
  1 (1.00%) high severe
Benchmarking HashSet/huge string/GxHash: Collecting 100 samples in estimated 5.0000 s (301M it
HashSet/huge string/GxHash
                        time:   [16.517 ns 16.560 ns 16.604 ns]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild
Benchmarking HashSet/huge string/AHash: Collecting 100 samples in estimated 5.0001 s (51M iter
HashSet/huge string/AHash
                        time:   [96.676 ns 96.959 ns 97.273 ns]
Found 2 outliers among 100 measurements (2.00%)
  1 (1.00%) low mild
  1 (1.00%) high mild
Benchmarking HashSet/huge string/XxHash: Collecting 100 samples in estimated 5.0003 s (42M ite
HashSet/huge string/XxHash
                        time:   [117.52 ns 117.76 ns 118.05 ns]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild
Benchmarking HashSet/huge string/FNV-1a: Collecting 100 samples in estimated 5.0026 s (4.0M it
HashSet/huge string/FNV-1a
                        time:   [1.2532 µs 1.2563 µs 1.2598 µs]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild

     Running benches/ilp.rs (target/release/deps/ilp-330edff5c1c6cab0)
Gnuplot not found, using plotters backend
baseline                time:   [111.14 µs 111.55 µs 111.98 µs]
Found 5 outliers among 100 measurements (5.00%)
  4 (4.00%) high mild
  1 (1.00%) high severe

unrolled                time:   [110.07 µs 110.46 µs 110.90 µs]
Found 3 outliers among 100 measurements (3.00%)
  3 (3.00%) high mild

temp                    time:   [25.573 µs 25.641 µs 25.705 µs]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) low mild

laned                   time:   [28.188 µs 28.252 µs 28.320 µs]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild

     Running benches/throughput/main.rs (target/release/deps/throughput-c6d0b3e82e610a4d)
gxhash
  | 4 > 6870.23
  | 8 > 13769.08
  | 16 > 27482.83
  | 32 > 31237.63
  | 64 > 29650.45
  | 128 > 36558.77
  | 256 > 50323.04
  | 512 > 62702.27
  | 1024 > 71876.27
  | 2048 > 76776.37
  | 4096 > 80019.70
  | 8192 > 80827.31
  | 16384 > 80598.52
  | 32768 > 81438.46

xxhash
  | 4 > 1686.89
  | 8 > 3375.21
  | 16 > 6909.64
  | 32 > 12207.03
  | 64 > 18017.27
  | 128 > 24344.66
  | 256 > 11200.77
  | 512 > 12903.35
  | 1024 > 18965.69
  | 2048 > 20094.00
  | 4096 > 20317.04
  | 8192 > 20912.19
  | 16384 > 21210.91
  | 32768 > 21195.35

ahash
  | 4 > 1335.73
  | 8 > 2667.66
  | 16 > 5405.07
  | 32 > 8073.90
  | 64 > 9593.26
  | 128 > 7480.30
  | 256 > 10435.62
  | 512 > 11954.83
  | 1024 > 12881.33
  | 2048 > 13004.55
  | 4096 > 12695.85
  | 8192 > 12360.43
  | 16384 > 12242.17
  | 32768 > 12539.94

t1ha0
  | 4 > 1316.88
  | 8 > 2635.66
  | 16 > 4712.57
  | 32 > 9390.02
  | 64 > 12208.89
  | 128 > 15777.90
  | 256 > 17946.68
  | 512 > 17272.48
  | 1024 > 16711.70
  | 2048 > 16280.49
  | 4096 > 15673.91
  | 8192 > 15694.10
  | 16384 > 15722.57
  | 32768 > 15464.85

seahash
  | 4 > 1233.12
  | 8 > 2723.07
  | 16 > 4391.04
  | 32 > 7776.32
  | 64 > 10222.31
  | 128 > 11208.23
  | 256 > 11020.38
  | 512 > 10404.72
  | 1024 > 10128.79
  | 2048 > 10047.35
  | 4096 > 9767.73
  | 8192 > 9740.71
  | 16384 > 9716.65
  | 32768 > 9751.43

metrohash
  | 4 > 649.31
  | 8 > 1298.62
  | 16 > 2362.65
  | 32 > 4835.71
  | 64 > 8056.72
  | 128 > 12023.51
  | 256 > 14897.79
  | 512 > 17208.86
  | 1024 > 18886.21
  | 2048 > 19289.12
  | 4096 > 19488.71
  | 8192 > 19957.13
  | 16384 > 20068.60
  | 32768 > 19620.79

highwayhash
  | 4 > 199.87
  | 8 > 412.44
  | 16 > 812.02
  | 32 > 1746.17
  | 64 > 2861.61
  | 128 > 4311.39
  | 256 > 5722.96
  | 512 > 6893.68
  | 1024 > 7695.43
  | 2048 > 8090.45
  | 4096 > 8189.45
  | 8192 > 8312.95
  | 16384 > 8358.75
  | 32768 > 8378.42

fnv-1a
  | 4 > 2287.96
  | 8 > 2711.60
  | 16 > 2879.07
  | 32 > 2394.56
  | 64 > 1676.11
  | 128 > 1243.05
  | 256 > 1009.88
  | 512 > 934.06
  | 1024 > 891.09
  | 2048 > 876.24
  | 4096 > 873.81
  | 8192 > 867.89
  | 16384 > 858.81
  | 32768 > 858.27

Finished
     Running benches/throughput_criterion.rs (target/release/deps/throughput_criterion-54142ea9f210e559)
Gnuplot not found, using plotters backend
all/gxhash/4            time:   [1.3401 ns 1.3447 ns 1.3492 ns]
                        thrpt:  [2.7610 GiB/s 2.7703 GiB/s 2.7798 GiB/s]
Found 1 outliers among 1000 measurements (0.10%)
  1 (0.10%) high mild
all/gxhash/16           time:   [1.3325 ns 1.3375 ns 1.3426 ns]
                        thrpt:  [11.099 GiB/s 11.141 GiB/s 11.183 GiB/s]
Found 1 outliers among 1000 measurements (0.10%)
  1 (0.10%) high mild
all/gxhash/64           time:   [2.9833 ns 2.9879 ns 2.9926 ns]
                        thrpt:  [19.917 GiB/s 19.949 GiB/s 19.980 GiB/s]
Found 66 outliers among 1000 measurements (6.60%)
  3 (0.30%) low mild
  52 (5.20%) high mild
  11 (1.10%) high severe
all/gxhash/256          time:   [5.8945 ns 5.9180 ns 5.9418 ns]
                        thrpt:  [40.125 GiB/s 40.287 GiB/s 40.447 GiB/s]
Found 4 outliers among 1000 measurements (0.40%)
  3 (0.30%) high mild
  1 (0.10%) high severe
all/gxhash/1024         time:   [14.654 ns 14.686 ns 14.717 ns]
                        thrpt:  [64.801 GiB/s 64.940 GiB/s 65.078 GiB/s]
Found 32 outliers among 1000 measurements (3.20%)
  15 (1.50%) low mild
  15 (1.50%) high mild
  2 (0.20%) high severe
all/gxhash/4096         time:   [52.090 ns 52.173 ns 52.257 ns]
                        thrpt:  [72.999 GiB/s 73.116 GiB/s 73.233 GiB/s]
Found 57 outliers among 1000 measurements (5.70%)
  1 (0.10%) low severe
  9 (0.90%) low mild
  33 (3.30%) high mild
  14 (1.40%) high severe
all/gxhash/16384        time:   [196.75 ns 197.04 ns 197.32 ns]
                        thrpt:  [77.328 GiB/s 77.441 GiB/s 77.556 GiB/s]
Found 78 outliers among 1000 measurements (7.80%)
  9 (0.90%) low severe
  23 (2.30%) low mild
  33 (3.30%) high mild
  13 (1.30%) high severe
all/gxhash/65536        time:   [776.50 ns 777.66 ns 778.80 ns]
                        thrpt:  [78.371 GiB/s 78.485 GiB/s 78.603 GiB/s]
Found 43 outliers among 1000 measurements (4.30%)
  2 (0.20%) low severe
  6 (0.60%) low mild
  27 (2.70%) high mild
  8 (0.80%) high severe
Benchmarking all/gxhash/262144: Collecting 1000 samples in estimated 3.1224 s (1.0M iterations
all/gxhash/262144       time:   [3.1379 µs 3.1412 µs 3.1445 µs]
                        thrpt:  [77.640 GiB/s 77.722 GiB/s 77.803 GiB/s]
Found 39 outliers among 1000 measurements (3.90%)
  2 (0.20%) low severe
  3 (0.30%) low mild
  29 (2.90%) high mild
  5 (0.50%) high severe
all/ahash/4             time:   [2.9754 ns 2.9797 ns 2.9843 ns]
                        thrpt:  [1.2483 GiB/s 1.2502 GiB/s 1.2520 GiB/s]
Found 33 outliers among 1000 measurements (3.30%)
  2 (0.20%) low mild
  26 (2.60%) high mild
  5 (0.50%) high severe
all/ahash/16            time:   [3.4643 ns 3.4685 ns 3.4729 ns]
                        thrpt:  [4.2907 GiB/s 4.2961 GiB/s 4.3013 GiB/s]
Found 80 outliers among 1000 measurements (8.00%)
  4 (0.40%) low mild
  58 (5.80%) high mild
  18 (1.80%) high severe
all/ahash/64            time:   [7.1803 ns 7.2101 ns 7.2390 ns]
                        thrpt:  [8.2338 GiB/s 8.2668 GiB/s 8.3012 GiB/s]
all/ahash/256           time:   [25.151 ns 25.206 ns 25.261 ns]
                        thrpt:  [9.4382 GiB/s 9.4587 GiB/s 9.4794 GiB/s]
Found 167 outliers among 1000 measurements (16.70%)
  38 (3.80%) low severe
  84 (8.40%) low mild
  33 (3.30%) high mild
  12 (1.20%) high severe
all/ahash/1024          time:   [76.565 ns 76.751 ns 76.937 ns]
                        thrpt:  [12.396 GiB/s 12.426 GiB/s 12.456 GiB/s]
Found 135 outliers among 1000 measurements (13.50%)
  4 (0.40%) low severe
  82 (8.20%) low mild
  34 (3.40%) high mild
  15 (1.50%) high severe
all/ahash/4096          time:   [302.38 ns 303.16 ns 303.93 ns]
                        thrpt:  [12.551 GiB/s 12.583 GiB/s 12.616 GiB/s]
Found 108 outliers among 1000 measurements (10.80%)
  69 (6.90%) low mild
  31 (3.10%) high mild
  8 (0.80%) high severe
all/ahash/16384         time:   [1.1958 µs 1.1983 µs 1.2009 µs]
                        thrpt:  [12.706 GiB/s 12.734 GiB/s 12.761 GiB/s]
Found 137 outliers among 1000 measurements (13.70%)
  12 (1.20%) low severe
  56 (5.60%) low mild
  51 (5.10%) high mild
  18 (1.80%) high severe
Benchmarking all/ahash/65536: Warming up for 3.0000 s
Warning: Unable to complete 1000 samples in 2.0s. You may wish to increase target time to 2.4s, enable flat sampling, or reduce sample count to 640.
all/ahash/65536         time:   [4.9033 µs 4.9255 µs 4.9505 µs]
                        thrpt:  [12.329 GiB/s 12.392 GiB/s 12.448 GiB/s]
Found 91 outliers among 1000 measurements (9.10%)
  31 (3.10%) low mild
  27 (2.70%) high mild
  33 (3.30%) high severe
all/ahash/262144        time:   [19.419 µs 19.468 µs 19.520 µs]
                        thrpt:  [12.507 GiB/s 12.540 GiB/s 12.572 GiB/s]
Found 45 outliers among 1000 measurements (4.50%)
  27 (2.70%) low mild
  14 (1.40%) high mild
  4 (0.40%) high severe
all/t1ha0/4             time:   [3.3025 ns 3.3089 ns 3.3153 ns]
                        thrpt:  [1.1237 GiB/s 1.1259 GiB/s 1.1280 GiB/s]
Found 62 outliers among 1000 measurements (6.20%)
  17 (1.70%) low mild
  28 (2.80%) high mild
  17 (1.70%) high severe
all/t1ha0/16            time:   [3.6201 ns 3.6261 ns 3.6321 ns]
                        thrpt:  [4.1026 GiB/s 4.1094 GiB/s 4.1162 GiB/s]
Found 52 outliers among 1000 measurements (5.20%)
  13 (1.30%) low mild
  22 (2.20%) high mild
  17 (1.70%) high severe
all/t1ha0/64            time:   [5.7883 ns 5.7965 ns 5.8048 ns]
                        thrpt:  [10.268 GiB/s 10.283 GiB/s 10.297 GiB/s]
Found 52 outliers among 1000 measurements (5.20%)
  12 (1.20%) low mild
  27 (2.70%) high mild
  13 (1.30%) high severe
all/t1ha0/256           time:   [14.906 ns 14.950 ns 14.995 ns]
                        thrpt:  [15.899 GiB/s 15.948 GiB/s 15.994 GiB/s]
Found 78 outliers among 1000 measurements (7.80%)
  48 (4.80%) low mild
  17 (1.70%) high mild
  13 (1.30%) high severe
all/t1ha0/1024          time:   [63.903 ns 64.093 ns 64.294 ns]
                        thrpt:  [14.833 GiB/s 14.880 GiB/s 14.924 GiB/s]
Found 69 outliers among 1000 measurements (6.90%)
  27 (2.70%) low mild
  29 (2.90%) high mild
  13 (1.30%) high severe
all/t1ha0/4096          time:   [276.25 ns 277.15 ns 278.08 ns]
                        thrpt:  [13.718 GiB/s 13.764 GiB/s 13.809 GiB/s]
Found 26 outliers among 1000 measurements (2.60%)
  11 (1.10%) low mild
  10 (1.00%) high mild
  5 (0.50%) high severe
all/t1ha0/16384         time:   [1.0812 µs 1.0866 µs 1.0931 µs]
                        thrpt:  [13.960 GiB/s 14.042 GiB/s 14.113 GiB/s]
Found 28 outliers among 1000 measurements (2.80%)
  17 (1.70%) high mild
  11 (1.10%) high severe
Benchmarking all/t1ha0/65536: Warming up for 3.0000 s
Warning: Unable to complete 1000 samples in 2.0s. You may wish to increase target time to 2.2s, enable flat sampling, or reduce sample count to 670.
all/t1ha0/65536         time:   [4.2929 µs 4.3032 µs 4.3134 µs]
                        thrpt:  [14.150 GiB/s 14.184 GiB/s 14.218 GiB/s]
Found 98 outliers among 1000 measurements (9.80%)
  69 (6.90%) low mild
  20 (2.00%) high mild
  9 (0.90%) high severe
all/t1ha0/262144        time:   [17.370 µs 17.397 µs 17.425 µs]
                        thrpt:  [14.011 GiB/s 14.033 GiB/s 14.055 GiB/s]
Found 53 outliers among 1000 measurements (5.30%)
  5 (0.50%) low severe
  26 (2.60%) low mild
  17 (1.70%) high mild
  5 (0.50%) high severe
all/xxhash/4            time:   [1.4267 ns 1.4312 ns 1.4357 ns]
                        thrpt:  [2.5948 GiB/s 2.6029 GiB/s 2.6111 GiB/s]
Found 6 outliers among 1000 measurements (0.60%)
  5 (0.50%) high mild
  1 (0.10%) high severe
all/xxhash/16           time:   [1.3820 ns 1.3864 ns 1.3911 ns]
                        thrpt:  [10.712 GiB/s 10.748 GiB/s 10.783 GiB/s]
Found 13 outliers among 1000 measurements (1.30%)
  11 (1.10%) high mild
  2 (0.20%) high severe
all/xxhash/64           time:   [3.4473 ns 3.4526 ns 3.4581 ns]
                        thrpt:  [17.236 GiB/s 17.263 GiB/s 17.290 GiB/s]
Found 45 outliers among 1000 measurements (4.50%)
  1 (0.10%) low severe
  3 (0.30%) low mild
  28 (2.80%) high mild
  13 (1.30%) high severe
all/xxhash/256          time:   [26.100 ns 26.144 ns 26.189 ns]
                        thrpt:  [9.1039 GiB/s 9.1195 GiB/s 9.1349 GiB/s]
Found 52 outliers among 1000 measurements (5.20%)
  2 (0.20%) low mild
  36 (3.60%) high mild
  14 (1.40%) high severe
all/xxhash/1024         time:   [56.663 ns 56.743 ns 56.826 ns]
                        thrpt:  [16.782 GiB/s 16.807 GiB/s 16.831 GiB/s]
Found 49 outliers among 1000 measurements (4.90%)
  3 (0.30%) low mild
  37 (3.70%) high mild
  9 (0.90%) high severe
all/xxhash/4096         time:   [195.80 ns 196.03 ns 196.27 ns]
                        thrpt:  [19.436 GiB/s 19.460 GiB/s 19.483 GiB/s]
Found 74 outliers among 1000 measurements (7.40%)
  9 (0.90%) low mild
  39 (3.90%) high mild
  26 (2.60%) high severe
all/xxhash/16384        time:   [736.83 ns 737.63 ns 738.48 ns]
                        thrpt:  [20.662 GiB/s 20.686 GiB/s 20.709 GiB/s]
Found 73 outliers among 1000 measurements (7.30%)
  3 (0.30%) low mild
  49 (4.90%) high mild
  21 (2.10%) high severe
all/xxhash/65536        time:   [2.9098 µs 2.9128 µs 2.9161 µs]
                        thrpt:  [20.931 GiB/s 20.954 GiB/s 20.975 GiB/s]
Found 89 outliers among 1000 measurements (8.90%)
  1 (0.10%) low severe
  2 (0.20%) low mild
  65 (6.50%) high mild
  21 (2.10%) high severe
Benchmarking all/xxhash/262144: Collecting 1000 samples in estimated 2.0058 s (171k iterations
all/xxhash/262144       time:   [11.765 µs 11.779 µs 11.793 µs]
                        thrpt:  [20.702 GiB/s 20.727 GiB/s 20.751 GiB/s]
Found 65 outliers among 1000 measurements (6.50%)
  2 (0.20%) low mild
  50 (5.00%) high mild
  13 (1.30%) high severe
Benchmarking all/highwayhash/4: Collecting 1000 samples in estimated 2.0093 s (103M iterations
all/highwayhash/4       time:   [19.512 ns 19.548 ns 19.585 ns]
                        thrpt:  [194.77 MiB/s 195.14 MiB/s 195.50 MiB/s]
Found 61 outliers among 1000 measurements (6.10%)
  1 (0.10%) low mild
  36 (3.60%) high mild
  24 (2.40%) high severe
Benchmarking all/highwayhash/16: Collecting 1000 samples in estimated 2.0052 s (94M iterations
all/highwayhash/16      time:   [21.121 ns 21.200 ns 21.278 ns]
                        thrpt:  [717.13 MiB/s 719.76 MiB/s 722.45 MiB/s]
Found 161 outliers among 1000 measurements (16.10%)
  61 (6.10%) low severe
  50 (5.00%) low mild
  37 (3.70%) high mild
  13 (1.30%) high severe
Benchmarking all/highwayhash/64: Collecting 1000 samples in estimated 2.0047 s (92M iterations
all/highwayhash/64      time:   [21.811 ns 21.842 ns 21.874 ns]
                        thrpt:  [2.7249 GiB/s 2.7289 GiB/s 2.7328 GiB/s]
Found 48 outliers among 1000 measurements (4.80%)
  1 (0.10%) low severe
  8 (0.80%) low mild
  26 (2.60%) high mild
  13 (1.30%) high severe
Benchmarking all/highwayhash/256: Collecting 1000 samples in estimated 2.0088 s (44M iteration
all/highwayhash/256     time:   [46.015 ns 46.093 ns 46.172 ns]
                        thrpt:  [5.1637 GiB/s 5.1726 GiB/s 5.1814 GiB/s]
Found 84 outliers among 1000 measurements (8.40%)
  10 (1.00%) low severe
  27 (2.70%) low mild
  36 (3.60%) high mild
  11 (1.10%) high severe
Benchmarking all/highwayhash/1024: Collecting 1000 samples in estimated 2.0316 s (15M iteratio
all/highwayhash/1024    time:   [137.98 ns 138.35 ns 138.72 ns]
                        thrpt:  [6.8748 GiB/s 6.8933 GiB/s 6.9119 GiB/s]
Found 15 outliers among 1000 measurements (1.50%)
  14 (1.40%) high mild
  1 (0.10%) high severe
Benchmarking all/highwayhash/4096: Collecting 1000 samples in estimated 2.2399 s (4.5M iterati
all/highwayhash/4096    time:   [494.19 ns 495.77 ns 497.34 ns]
                        thrpt:  [7.6702 GiB/s 7.6945 GiB/s 7.7190 GiB/s]
Found 8 outliers among 1000 measurements (0.80%)
  7 (0.70%) high mild
  1 (0.10%) high severe
Benchmarking all/highwayhash/16384: Collecting 1000 samples in estimated 2.9028 s (1.5M iterat
all/highwayhash/16384   time:   [1.9267 µs 1.9317 µs 1.9367 µs]
                        thrpt:  [7.8787 GiB/s 7.8991 GiB/s 7.9195 GiB/s]
Found 8 outliers among 1000 measurements (0.80%)
  6 (0.60%) high mild
  2 (0.20%) high severe
Benchmarking all/highwayhash/65536: Warming up for 3.0000 s
Warning: Unable to complete 1000 samples in 2.0s. You may wish to increase target time to 3.9s, enable flat sampling, or reduce sample count to 500.
Benchmarking all/highwayhash/65536: Collecting 1000 samples in estimated 3.8991 s (500k iterat
all/highwayhash/65536   time:   [7.8112 µs 7.8604 µs 7.9159 µs]
                        thrpt:  [7.7104 GiB/s 7.7649 GiB/s 7.8138 GiB/s]
Found 14 outliers among 1000 measurements (1.40%)
  8 (0.80%) high mild
  6 (0.60%) high severe
Benchmarking all/highwayhash/262144: Collecting 1000 samples in estimated 2.0280 s (64k iterat
all/highwayhash/262144  time:   [31.302 µs 31.382 µs 31.462 µs]
                        thrpt:  [7.7598 GiB/s 7.7796 GiB/s 7.7994 GiB/s]
Found 3 outliers among 1000 measurements (0.30%)
  1 (0.10%) high mild
  2 (0.20%) high severe
all/fnv-1a/4            time:   [2.0950 ns 2.0981 ns 2.1013 ns]
                        thrpt:  [1.7728 GiB/s 1.7755 GiB/s 1.7782 GiB/s]
Found 39 outliers among 1000 measurements (3.90%)
  3 (0.30%) low mild
  26 (2.60%) high mild
  10 (1.00%) high severe
all/fnv-1a/16           time:   [5.8453 ns 5.8647 ns 5.8850 ns]
                        thrpt:  [2.5320 GiB/s 2.5408 GiB/s 2.5493 GiB/s]
Found 38 outliers among 1000 measurements (3.80%)
  1 (0.10%) low mild
  27 (2.70%) high mild
  10 (1.00%) high severe
all/fnv-1a/64           time:   [38.870 ns 38.983 ns 39.098 ns]
                        thrpt:  [1.5245 GiB/s 1.5290 GiB/s 1.5334 GiB/s]
Found 7 outliers among 1000 measurements (0.70%)
  6 (0.60%) high mild
  1 (0.10%) high severe
all/fnv-1a/256          time:   [244.73 ns 245.27 ns 245.81 ns]
                        thrpt:  [993.23 MiB/s 995.40 MiB/s 997.58 MiB/s]
Found 37 outliers among 1000 measurements (3.70%)
  28 (2.80%) high mild
  9 (0.90%) high severe
all/fnv-1a/1024         time:   [1.1019 µs 1.1043 µs 1.1068 µs]
                        thrpt:  [882.37 MiB/s 884.34 MiB/s 886.26 MiB/s]
Found 66 outliers among 1000 measurements (6.60%)
  40 (4.00%) high mild
  26 (2.60%) high severe
Benchmarking all/fnv-1a/4096: Warming up for 3.0000 s
Warning: Unable to complete 1000 samples in 2.0s. You may wish to increase target time to 2.3s, enable flat sampling, or reduce sample count to 650.
all/fnv-1a/4096         time:   [4.5460 µs 4.5540 µs 4.5623 µs]
                        thrpt:  [856.20 MiB/s 857.76 MiB/s 859.28 MiB/s]
Found 42 outliers among 1000 measurements (4.20%)
  30 (3.00%) high mild
  12 (1.20%) high severe
all/fnv-1a/16384        time:   [18.235 µs 18.264 µs 18.294 µs]
                        thrpt:  [854.12 MiB/s 855.51 MiB/s 856.85 MiB/s]
Found 35 outliers among 1000 measurements (3.50%)
  33 (3.30%) high mild
  2 (0.20%) high severe
all/fnv-1a/65536        time:   [72.964 µs 73.084 µs 73.208 µs]
                        thrpt:  [853.74 MiB/s 855.18 MiB/s 856.59 MiB/s]
Found 61 outliers among 1000 measurements (6.10%)
  56 (5.60%) high mild
  5 (0.50%) high severe
Benchmarking all/fnv-1a/262144: Collecting 1000 samples in estimated 2.0327 s (7000 iterations
all/fnv-1a/262144       time:   [289.00 µs 289.32 µs 289.65 µs]
                        thrpt:  [863.11 MiB/s 864.10 MiB/s 865.06 MiB/s]
Found 33 outliers among 1000 measurements (3.30%)
  20 (2.00%) high mild
  13 (1.30%) high severe

@3tieto
Copy link

3tieto commented Dec 12, 2023

this is a test on AMD EPYC 7282 16-Core Processor CPU @ 2.0GHz
criterion.zip


❯ cargo build --benches --release --keep-going
cargo bench --no-fail-fast


    Updating `tuna` index

remote: Enumerating objects: 211891, done.
remote: Counting objects: 100% (53142/53142), done.
remote: Compressing objects: 100% (33099/33099), done.
remote: Total 211891 (delta 27107), reused 20043 (delta 20043), pack-reused 158749
Receiving objects: 100% (211891/211891), 119.42 MiB | 7.28 MiB/s, done.
Resolving deltas: 100% (122700/122700), done.
From https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index
 + b8cdf28431c...dc5332c7e4f            -> origin/HEAD  (forced update)
  Downloaded itoa v1.0.10 (registry `tuna`)
  Downloaded clap v4.4.11 (registry `tuna`)
  Downloaded clap_builder v4.4.11 (registry `tuna`)
  Downloaded rustix v0.38.28 (registry `tuna`)
  Downloaded linux-raw-sys v0.4.12 (registry `tuna`)
  Downloaded zerocopy v0.7.30 (registry `tuna`)
  Downloaded ryu v1.0.16 (registry `tuna`)
  Downloaded syn v2.0.40 (registry `tuna`)
  Downloaded once_cell v1.19.0 (registry `tuna`)
  Downloaded libc v0.2.151 (registry `tuna`)
  Downloaded 10 crates (3.3 MB) in 0.53s (largest was `linux-raw-sys` at 1.5 MB)
   Compiling autocfg v1.1.0
   Compiling proc-macro2 v1.0.70
   Compiling unicode-ident v1.0.12
   Compiling cfg-if v1.0.0
   Compiling libc v0.2.151
   Compiling semver v1.0.20
   Compiling futures-core v0.3.29
   Compiling crossbeam-utils v0.8.16
   Compiling futures-task v0.3.29
   Compiling serde v1.0.193
   Compiling futures-channel v0.3.29
   Compiling futures-util v0.3.29
   Compiling memoffset v0.9.0
   Compiling crossbeam-epoch v0.9.15
   Compiling slab v0.4.9
   Compiling num-traits v0.2.17
   Compiling futures-sink v0.3.29
   Compiling scopeguard v1.2.0
   Compiling quote v1.0.33
   Compiling memchr v2.6.4
   Compiling semver-parser v0.7.0
   Compiling syn v2.0.40
   Compiling getrandom v0.2.11
   Compiling semver v0.9.0
   Compiling rand_core v0.6.4
   Compiling rustc_version v0.4.0
   Compiling aho-corasick v1.1.2
   Compiling either v1.9.0
   Compiling ppv-lite86 v0.2.17
   Compiling rustix v0.38.28
   Compiling regex-syntax v0.8.2
   Compiling serde_json v1.0.108
   Compiling pin-utils v0.1.0
   Compiling futures-io v0.3.29
   Compiling rayon-core v1.12.0
   Compiling pin-project-lite v0.2.13
   Compiling rand_chacha v0.3.1
   Compiling rstest_macros v0.18.2
   Compiling rustc_version v0.2.3
   Compiling crossbeam-deque v0.8.3
   Compiling ryu v1.0.16
   Compiling bitflags v2.4.1
   Compiling half v1.8.2
   Compiling linux-raw-sys v0.4.12
   Compiling plotters-backend v0.3.5
   Compiling anstyle v1.0.4
   Compiling itoa v1.0.10
   Compiling version_check v0.9.4
   Compiling clap_lex v0.6.0
   Compiling ciborium-io v0.2.1
   Compiling ciborium-ll v0.2.1
   Compiling clap_builder v4.4.11
   Compiling plotters-svg v0.3.5
   Compiling ahash v0.8.6
   Compiling regex-automata v0.4.3
   Compiling t1ha v0.1.0
   Compiling rand v0.8.5
   Compiling itertools v0.10.5
   Compiling relative-path v1.9.0
   Compiling same-file v1.0.6
   Compiling once_cell v1.19.0
   Compiling cast v0.3.0
   Compiling glob v0.3.1
   Compiling walkdir v2.4.0
   Compiling regex v1.10.2
   Compiling criterion-plot v0.5.0
   Compiling clap v4.4.11
   Compiling is-terminal v0.4.9
   Compiling rayon v1.8.0
   Compiling serde_derive v1.0.193
   Compiling futures-macro v0.3.29
   Compiling plotters v0.3.5
   Compiling zerocopy v0.7.30
   Compiling static_assertions v1.1.0
   Compiling futures-timer v3.0.2
   Compiling anes v0.1.6
   Compiling oorandom v11.1.3
   Compiling lazy_static v1.4.0
   Compiling cfg-if v0.1.10
   Compiling twox-hash v1.6.3
   Compiling fnv v1.0.7
   Compiling highway v1.1.0
   Compiling seahash v4.1.0
   Compiling metrohash v1.0.6
   Compiling gxhash v2.3.0 (/root/git/gxhash)
   Compiling futures-executor v0.3.29
   Compiling futures v0.3.29
   Compiling rstest v0.18.2
   Compiling ciborium v0.2.1
   Compiling tinytemplate v1.2.1
   Compiling criterion v0.5.1
    Finished release [optimized] target(s) in 1m 45s
    Finished bench [optimized] target(s) in 0.13s
     Running unittests src/lib.rs (target/release/deps/gxhash-115ae01b727a1a82)

running 21 tests
test gxhash::tests::add_zeroes_mutates_hash ... ignored
test gxhash::tests::all_blocks_are_consumed ... ignored
test gxhash::tests::does_not_hash_outside_of_bounds ... ignored
test gxhash::tests::hash_of_zero_is_not_zero ... ignored
test gxhash::tests::is_stable ... ignored
test gxhash::tests::test_collisions_bits::case_01 ... ignored
test gxhash::tests::test_collisions_bits::case_02 ... ignored
test gxhash::tests::test_collisions_bits::case_03 ... ignored
test gxhash::tests::test_collisions_bits::case_04 ... ignored
test gxhash::tests::test_collisions_bits::case_05 ... ignored
test gxhash::tests::test_collisions_bits::case_06 ... ignored
test gxhash::tests::test_collisions_bits::case_07 ... ignored
test gxhash::tests::test_collisions_bits::case_08 ... ignored
test gxhash::tests::test_collisions_bits::case_09 ... ignored
test gxhash::tests::test_collisions_bits::case_10 ... ignored
test gxhash::tests::test_collisions_bits::case_11 ... ignored
test hasher::tests::default_gxhasherbuilder_is_randomly_seeded ... ignored
test hasher::tests::gxhasherbuilder_builds_same_hashers ... ignored
test hasher::tests::gxhashset_uses_default_gxhasherbuilder ... ignored
test hasher::tests::hasher_handles_empty_inputs ... ignored
test hasher::tests::hasher_produces_stable_hashes ... ignored

test result: ok. 0 passed; 0 failed; 21 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running benches/hashset.rs (target/release/deps/hashset-ac00d0e762db8e1a)
Gnuplot not found, using plotters backend
Benchmarking HashSet/u32/Default Hasher: Collecting 100 samples in estimated 5.0001 s (299M ite
HashSet/u32/Default Hasher
                        time:   [16.208 ns 16.496 ns 16.786 ns]
Found 2 outliers among 100 measurements (2.00%)
  1 (1.00%) high mild
  1 (1.00%) high severe
HashSet/u32/GxHash      time:   [3.1712 ns 3.2703 ns 3.3741 ns]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild
HashSet/u32/AHash       time:   [3.1521 ns 3.2864 ns 3.4346 ns]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high severe
HashSet/u32/XxHash      time:   [62.996 ns 63.999 ns 65.054 ns]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild
HashSet/u32/FNV-1a      time:   [3.6338 ns 3.6933 ns 3.7533 ns]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild

Benchmarking HashSet/u64/Default Hasher: Collecting 100 samples in estimated 5.0000 s (249M ite
HashSet/u64/Default Hasher
                        time:   [20.214 ns 20.675 ns 21.227 ns]
Found 2 outliers among 100 measurements (2.00%)
  1 (1.00%) high mild
  1 (1.00%) high severe
HashSet/u64/GxHash      time:   [2.9695 ns 3.0521 ns 3.1452 ns]
Found 3 outliers among 100 measurements (3.00%)
  3 (3.00%) high mild
HashSet/u64/AHash       time:   [3.4118 ns 3.5457 ns 3.6771 ns]
HashSet/u64/XxHash      time:   [61.315 ns 62.172 ns 63.088 ns]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild
HashSet/u64/FNV-1a      time:   [8.4871 ns 9.0561 ns 9.7150 ns]
Found 6 outliers among 100 measurements (6.00%)
  2 (2.00%) high mild
  4 (4.00%) high severe

Benchmarking HashSet/u128/Default Hasher: Collecting 100 samples in estimated 5.0001 s (216M it
HashSet/u128/Default Hasher
                        time:   [22.203 ns 22.611 ns 23.026 ns]
Benchmarking HashSet/u128/GxHash: Collecting 100 samples in estimated 5.0000 s (1.4B iterations
HashSet/u128/GxHash     time:   [3.3225 ns 3.4045 ns 3.4925 ns]
Found 15 outliers among 100 measurements (15.00%)
  15 (15.00%) high mild
HashSet/u128/AHash      time:   [3.2976 ns 3.4366 ns 3.5785 ns]
HashSet/u128/XxHash     time:   [61.957 ns 62.848 ns 63.728 ns]
Benchmarking HashSet/u128/FNV-1a: Collecting 100 samples in estimated 5.0000 s (317M iterations
HashSet/u128/FNV-1a     time:   [14.491 ns 14.737 ns 15.012 ns]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild

Benchmarking HashSet/small string/Default Hasher: Collecting 100 samples in estimated 5.0001 s
HashSet/small string/Default Hasher
                        time:   [22.197 ns 22.597 ns 23.034 ns]
Benchmarking HashSet/small string/GxHash: Collecting 100 samples in estimated 5.0000 s (644M it
HashSet/small string/GxHash
                        time:   [7.6408 ns 7.8541 ns 8.0812 ns]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild
Benchmarking HashSet/small string/AHash: Collecting 100 samples in estimated 5.0000 s (423M ite
HashSet/small string/AHash
                        time:   [10.765 ns 11.157 ns 11.649 ns]
Found 3 outliers among 100 measurements (3.00%)
  2 (2.00%) high mild
  1 (1.00%) high severe
Benchmarking HashSet/small string/XxHash: Collecting 100 samples in estimated 5.0003 s (71M ite
HashSet/small string/XxHash
                        time:   [67.729 ns 69.533 ns 71.650 ns]
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) high severe
Benchmarking HashSet/small string/FNV-1a: Collecting 100 samples in estimated 5.0000 s (523M it
HashSet/small string/FNV-1a
                        time:   [10.934 ns 12.014 ns 13.318 ns]
Found 13 outliers among 100 measurements (13.00%)
  4 (4.00%) high mild
  9 (9.00%) high severe

Benchmarking HashSet/medium string/Default Hasher: Collecting 100 samples in estimated 5.0001 s
HashSet/medium string/Default Hasher
                        time:   [31.020 ns 31.618 ns 32.298 ns]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high severe
Benchmarking HashSet/medium string/GxHash: Collecting 100 samples in estimated 5.0000 s (507M i
HashSet/medium string/GxHash
                        time:   [9.2999 ns 9.5742 ns 9.8435 ns]
Benchmarking HashSet/medium string/AHash: Collecting 100 samples in estimated 5.0001 s (412M it
HashSet/medium string/AHash
                        time:   [10.821 ns 11.157 ns 11.504 ns]
Found 6 outliers among 100 measurements (6.00%)
  2 (2.00%) high mild
  4 (4.00%) high severe
Benchmarking HashSet/medium string/XxHash: Collecting 100 samples in estimated 5.0001 s (68M it
HashSet/medium string/XxHash
                        time:   [68.682 ns 69.893 ns 71.107 ns]
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) high mild
Benchmarking HashSet/medium string/FNV-1a: Collecting 100 samples in estimated 5.0000 s (129M i
HashSet/medium string/FNV-1a
                        time:   [37.559 ns 38.345 ns 39.124 ns]

Benchmarking HashSet/large string/Default Hasher: Collecting 100 samples in estimated 5.0003 s
HashSet/large string/Default Hasher
                        time:   [148.79 ns 152.67 ns 156.93 ns]
Found 4 outliers among 100 measurements (4.00%)
  3 (3.00%) high mild
  1 (1.00%) high severe
Benchmarking HashSet/large string/GxHash: Collecting 100 samples in estimated 5.0001 s (173M it
HashSet/large string/GxHash
                        time:   [25.836 ns 26.397 ns 27.055 ns]
Found 7 outliers among 100 measurements (7.00%)
  4 (4.00%) high mild
  3 (3.00%) high severe
Benchmarking HashSet/large string/AHash: Collecting 100 samples in estimated 5.0001 s (168M ite
HashSet/large string/AHash
                        time:   [30.557 ns 31.377 ns 32.265 ns]
Benchmarking HashSet/large string/XxHash: Collecting 100 samples in estimated 5.0001 s (41M ite
HashSet/large string/XxHash
                        time:   [122.59 ns 124.39 ns 126.13 ns]
Benchmarking HashSet/large string/FNV-1a: Collecting 100 samples in estimated 5.0029 s (8.4M it
HashSet/large string/FNV-1a
                        time:   [595.44 ns 599.01 ns 603.00 ns]
Found 5 outliers among 100 measurements (5.00%)
  2 (2.00%) high mild
  3 (3.00%) high severe

Benchmarking HashSet/huge string/Default Hasher: Collecting 100 samples in estimated 5.0015 s (
HashSet/huge string/Default Hasher
                        time:   [386.30 ns 394.99 ns 403.72 ns]
Benchmarking HashSet/huge string/GxHash: Collecting 100 samples in estimated 5.0001 s (116M ite
HashSet/huge string/GxHash
                        time:   [41.802 ns 42.413 ns 43.022 ns]
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) high mild
Benchmarking HashSet/huge string/AHash: Collecting 100 samples in estimated 5.0002 s (95M itera
HashSet/huge string/AHash
                        time:   [49.483 ns 50.520 ns 51.644 ns]
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) high mild
Benchmarking HashSet/huge string/XxHash: Collecting 100 samples in estimated 5.0002 s (28M iter
HashSet/huge string/XxHash
                        time:   [168.37 ns 170.53 ns 172.80 ns]
Found 5 outliers among 100 measurements (5.00%)
  5 (5.00%) high mild
Benchmarking HashSet/huge string/FNV-1a: Collecting 100 samples in estimated 5.0018 s (3.2M ite
HashSet/huge string/FNV-1a
                        time:   [1.5317 µs 1.5381 µs 1.5456 µs]
Found 4 outliers among 100 measurements (4.00%)
  3 (3.00%) high mild
  1 (1.00%) high severe

     Running benches/ilp.rs (target/release/deps/ilp-6df32e74a0786dca)
Gnuplot not found, using plotters backend
baseline                time:   [129.51 µs 129.82 µs 130.16 µs]
Found 10 outliers among 100 measurements (10.00%)
  1 (1.00%) low mild
  4 (4.00%) high mild
  5 (5.00%) high severe

unrolled                time:   [129.77 µs 130.33 µs 131.02 µs]
Found 14 outliers among 100 measurements (14.00%)
  2 (2.00%) low mild
  5 (5.00%) high mild
  7 (7.00%) high severe

temp                    time:   [53.697 µs 54.977 µs 56.245 µs]

laned                   time:   [47.638 µs 48.941 µs 50.247 µs]

     Running benches/throughput/main.rs (target/release/deps/throughput-d6db199624ea9d18)
gxhash
  | 4 > 3763.20
  | 8 > 8199.93
  | 16 > 15938.00
  | 32 > 19662.17
  | 64 > 12384.91
  | 128 > 13467.27
  | 256 > 22857.42
  | 512 > 30162.61
  | 1024 > 40446.98
  | 2048 > 44543.31
  | 4096 > 50007.77
  | 8192 > 49693.65
  | 16384 > 53433.12
  | 32768 > 52321.48

xxhash
  | 4 > 730.68
  | 8 > 1372.46
  | 16 > 3344.28
  | 32 > 5533.53
  | 64 > 8173.74
  | 128 > 10484.42
  | 256 > 8852.13
  | 512 > 10320.86
  | 1024 > 13315.46
  | 2048 > 14592.10
  | 4096 > 14882.32
  | 8192 > 15059.28
  | 16384 > 14554.93
  | 32768 > 14897.74

ahash
  | 4 > 1217.46
  | 8 > 2392.09
  | 16 > 5623.73
  | 32 > 9883.30
  | 64 > 14303.08
  | 128 > 13439.78
  | 256 > 18669.38
  | 512 > 23813.37
  | 1024 > 29102.41
  | 2048 > 30734.49
  | 4096 > 30409.38
  | 8192 > 29991.41
  | 16384 > 31426.71
  | 32768 > 32531.47

t1ha0
  | 4 > 471.77
  | 8 > 953.54
  | 16 > 1888.98
  | 32 > 3198.57
  | 64 > 6140.35
  | 128 > 10143.63
  | 256 > 16997.40
  | 512 > 25604.73
  | 1024 > 34420.40
  | 2048 > 43977.63
  | 4096 > 48830.78
  | 8192 > 49181.65
  | 16384 > 55877.59
  | 32768 > 49915.02

seahash
  | 4 > 179.49
  | 8 > 354.55
  | 16 > 641.40
  | 32 > 1329.76
  | 64 > 1990.60
  | 128 > 2694.62
  | 256 > 3299.98
  | 512 > 3656.04
  | 1024 > 3931.86
  | 2048 > 4061.45
  | 4096 > 4024.80
  | 8192 > 4085.87
  | 16384 > 4116.55
  | 32768 > 4121.61

metrohash
  | 4 > 466.16
  | 8 > 993.58
  | 16 > 1874.57
  | 32 > 2518.66
  | 64 > 4281.04
  | 128 > 6035.97
  | 256 > 7558.98
  | 512 > 9264.10
  | 1024 > 10663.80
  | 2048 > 10235.01
  | 4096 > 12011.97
  | 8192 > 12943.32
  | 16384 > 12697.59
  | 32768 > 12939.92

highwayhash
  | 4 > 97.36
  | 8 > 205.74
  | 16 > 393.42
  | 32 > 1088.73
  | 64 > 2129.10
  | 128 > 3741.51
  | 256 > 5058.55
  | 512 > 6484.03
  | 1024 > 7740.14
  | 2048 > 10315.68
  | 4096 > 11733.61
  | 8192 > 10919.24
  | 16384 > 12359.90
  | 32768 > 12322.91

fnv-1a
  | 4 > 1014.22
  | 8 > 1053.99
  | 16 > 1128.24
  | 32 > 871.13
  | 64 > 753.65
  | 128 > 756.77
  | 256 > 745.97
  | 512 > 743.52
  | 1024 > 726.51
  | 2048 > 715.75
  | 4096 > 736.14
  | 8192 > 742.89
  | 16384 > 744.10
  | 32768 > 738.79

Finished
     Running benches/throughput_criterion.rs (target/release/deps/throughput_criterion-b5494b5d58931ae9)
Gnuplot not found, using plotters backend
all/gxhash/4            time:   [2.6913 ns 2.7396 ns 2.7895 ns]
                        thrpt:  [1.3355 GiB/s 1.3598 GiB/s 1.3842 GiB/s]
Found 2 outliers among 1000 measurements (0.20%)
  1 (0.10%) high mild
  1 (0.10%) high severe
all/gxhash/16           time:   [2.6375 ns 2.7001 ns 2.7647 ns]
                        thrpt:  [5.3898 GiB/s 5.5188 GiB/s 5.6497 GiB/s]
Found 121 outliers among 1000 measurements (12.10%)
  116 (11.60%) high mild
  5 (0.50%) high severe
all/gxhash/64           time:   [7.2510 ns 7.4353 ns 7.6240 ns]
                        thrpt:  [7.8181 GiB/s 8.0165 GiB/s 8.2202 GiB/s]
Found 35 outliers among 1000 measurements (3.50%)
  32 (3.20%) high mild
  3 (0.30%) high severe
all/gxhash/256          time:   [14.576 ns 14.843 ns 15.108 ns]
                        thrpt:  [15.781 GiB/s 16.063 GiB/s 16.356 GiB/s]
Found 2 outliers among 1000 measurements (0.20%)
  1 (0.10%) high mild
  1 (0.10%) high severe
all/gxhash/1024         time:   [29.048 ns 29.373 ns 29.701 ns]
                        thrpt:  [32.109 GiB/s 32.468 GiB/s 32.831 GiB/s]
Found 13 outliers among 1000 measurements (1.30%)
  11 (1.10%) high mild
  2 (0.20%) high severe
all/gxhash/4096         time:   [90.077 ns 91.082 ns 92.124 ns]
                        thrpt:  [41.408 GiB/s 41.882 GiB/s 42.349 GiB/s]
Found 66 outliers among 1000 measurements (6.60%)
  53 (5.30%) high mild
  13 (1.30%) high severe
all/gxhash/16384        time:   [317.77 ns 321.97 ns 326.28 ns]
                        thrpt:  [46.765 GiB/s 47.393 GiB/s 48.018 GiB/s]
Found 18 outliers among 1000 measurements (1.80%)
  13 (1.30%) high mild
  5 (0.50%) high severe
all/gxhash/65536        time:   [1.1874 µs 1.1982 µs 1.2098 µs]
                        thrpt:  [50.452 GiB/s 50.938 GiB/s 51.404 GiB/s]
Found 26 outliers among 1000 measurements (2.60%)
  19 (1.90%) high mild
  7 (0.70%) high severe
Benchmarking all/gxhash/262144: Warming up for 3.0000 s
Warning: Unable to complete 1000 samples in 2.0s. You may wish to increase target time to 2.4s, enable flat sampling, or reduce sample count to 640.
all/gxhash/262144       time:   [4.7571 µs 4.8144 µs 4.8750 µs]
                        thrpt:  [50.080 GiB/s 50.710 GiB/s 51.321 GiB/s]
Found 79 outliers among 1000 measurements (7.90%)
  26 (2.60%) high mild
  53 (5.30%) high severe
all/ahash/4             time:   [3.8348 ns 3.9007 ns 3.9684 ns]
                        thrpt:  [961.26 MiB/s 977.95 MiB/s 994.75 MiB/s]
Found 3 outliers among 1000 measurements (0.30%)
  2 (0.20%) high mild
  1 (0.10%) high severe
all/ahash/16            time:   [3.8377 ns 3.9288 ns 4.0300 ns]
                        thrpt:  [3.6975 GiB/s 3.7928 GiB/s 3.8828 GiB/s]
Found 6 outliers among 1000 measurements (0.60%)
  4 (0.40%) high mild
  2 (0.20%) high severe
all/ahash/64            time:   [4.9254 ns 5.0174 ns 5.1115 ns]
                        thrpt:  [11.661 GiB/s 11.880 GiB/s 12.101 GiB/s]
Found 35 outliers among 1000 measurements (3.50%)
  32 (3.20%) high mild
  3 (0.30%) high severe
all/ahash/256           time:   [14.802 ns 14.995 ns 15.194 ns]
                        thrpt:  [15.692 GiB/s 15.900 GiB/s 16.107 GiB/s]
Found 30 outliers among 1000 measurements (3.00%)
  25 (2.50%) high mild
  5 (0.50%) high severe
all/ahash/1024          time:   [39.462 ns 40.026 ns 40.624 ns]
                        thrpt:  [23.476 GiB/s 23.826 GiB/s 24.167 GiB/s]
Found 30 outliers among 1000 measurements (3.00%)
  15 (1.50%) high mild
  15 (1.50%) high severe
all/ahash/4096          time:   [137.44 ns 139.45 ns 141.54 ns]
                        thrpt:  [26.951 GiB/s 27.355 GiB/s 27.755 GiB/s]
Found 34 outliers among 1000 measurements (3.40%)
  31 (3.10%) high mild
  3 (0.30%) high severe
all/ahash/16384         time:   [508.53 ns 512.62 ns 517.23 ns]
                        thrpt:  [29.501 GiB/s 29.766 GiB/s 30.005 GiB/s]
Found 163 outliers among 1000 measurements (16.30%)
  82 (8.20%) high mild
  81 (8.10%) high severe
all/ahash/65536         time:   [2.0123 µs 2.0459 µs 2.0814 µs]
                        thrpt:  [29.323 GiB/s 29.833 GiB/s 30.332 GiB/s]
Found 136 outliers among 1000 measurements (13.60%)
  41 (4.10%) high mild
  95 (9.50%) high severe
all/ahash/262144        time:   [8.2690 µs 8.3592 µs 8.4562 µs]
                        thrpt:  [28.871 GiB/s 29.206 GiB/s 29.525 GiB/s]
Found 90 outliers among 1000 measurements (9.00%)
  60 (6.00%) high mild
  30 (3.00%) high severe
all/t1ha0/4             time:   [8.7387 ns 8.8683 ns 9.0059 ns]
                        thrpt:  [423.58 MiB/s 430.15 MiB/s 436.53 MiB/s]
Found 69 outliers among 1000 measurements (6.90%)
  64 (6.40%) high mild
  5 (0.50%) high severe
all/t1ha0/16            time:   [9.6197 ns 9.8428 ns 10.105 ns]
                        thrpt:  [1.4746 GiB/s 1.5139 GiB/s 1.5490 GiB/s]
Found 19 outliers among 1000 measurements (1.90%)
  12 (1.20%) high mild
  7 (0.70%) high severe
all/t1ha0/64            time:   [9.8798 ns 9.9820 ns 10.088 ns]
                        thrpt:  [5.9085 GiB/s 5.9712 GiB/s 6.0330 GiB/s]
Found 30 outliers among 1000 measurements (3.00%)
  28 (2.80%) high mild
  2 (0.20%) high severe
all/t1ha0/256           time:   [14.002 ns 14.199 ns 14.400 ns]
                        thrpt:  [16.557 GiB/s 16.792 GiB/s 17.027 GiB/s]
Found 1 outliers among 1000 measurements (0.10%)
  1 (0.10%) high mild
all/t1ha0/1024          time:   [27.007 ns 27.435 ns 27.872 ns]
                        thrpt:  [34.217 GiB/s 34.761 GiB/s 35.312 GiB/s]
Found 17 outliers among 1000 measurements (1.70%)
  15 (1.50%) high mild
  2 (0.20%) high severe
all/t1ha0/4096          time:   [84.875 ns 86.405 ns 87.997 ns]
                        thrpt:  [43.350 GiB/s 44.149 GiB/s 44.945 GiB/s]
Found 62 outliers among 1000 measurements (6.20%)
  36 (3.60%) high mild
  26 (2.60%) high severe
all/t1ha0/16384         time:   [334.45 ns 341.24 ns 348.28 ns]
                        thrpt:  [43.812 GiB/s 44.715 GiB/s 45.624 GiB/s]
Found 3 outliers among 1000 measurements (0.30%)
  2 (0.20%) high mild
  1 (0.10%) high severe
all/t1ha0/65536         time:   [1.2156 µs 1.2331 µs 1.2514 µs]
                        thrpt:  [48.772 GiB/s 49.499 GiB/s 50.211 GiB/s]
Found 55 outliers among 1000 measurements (5.50%)
  52 (5.20%) high mild
  3 (0.30%) high severe
Benchmarking all/t1ha0/262144: Warming up for 3.0000 s
Warning: Unable to complete 1000 samples in 2.0s. You may wish to increase target time to 2.5s, enable flat sampling, or reduce sample count to 620.
all/t1ha0/262144        time:   [4.6991 µs 4.7426 µs 4.7910 µs]
                        thrpt:  [50.958 GiB/s 51.478 GiB/s 51.955 GiB/s]
Found 3 outliers among 1000 measurements (0.30%)
  3 (0.30%) high severe
all/xxhash/4            time:   [3.9280 ns 3.9835 ns 4.0405 ns]
                        thrpt:  [944.12 MiB/s 957.64 MiB/s 971.15 MiB/s]
Found 66 outliers among 1000 measurements (6.60%)
  63 (6.30%) high mild
  3 (0.30%) high severe
all/xxhash/16           time:   [3.4712 ns 3.5222 ns 3.5726 ns]
                        thrpt:  [4.1710 GiB/s 4.2306 GiB/s 4.2928 GiB/s]
Found 5 outliers among 1000 measurements (0.50%)
  2 (0.20%) high mild
  3 (0.30%) high severe
all/xxhash/64           time:   [6.5159 ns 6.5804 ns 6.6483 ns]
                        thrpt:  [8.9654 GiB/s 9.0580 GiB/s 9.1476 GiB/s]
Found 78 outliers among 1000 measurements (7.80%)
  68 (6.80%) high mild
  10 (1.00%) high severe
all/xxhash/256          time:   [31.862 ns 32.215 ns 32.578 ns]
                        thrpt:  [7.3184 GiB/s 7.4009 GiB/s 7.4829 GiB/s]
Found 11 outliers among 1000 measurements (1.10%)
  9 (0.90%) high mild
  2 (0.20%) high severe
all/xxhash/1024         time:   [76.962 ns 77.373 ns 77.813 ns]
                        thrpt:  [12.256 GiB/s 12.326 GiB/s 12.392 GiB/s]
Found 17 outliers among 1000 measurements (1.70%)
  14 (1.40%) high mild
  3 (0.30%) high severe
all/xxhash/4096         time:   [279.65 ns 285.18 ns 293.35 ns]
                        thrpt:  [13.004 GiB/s 13.376 GiB/s 13.641 GiB/s]
Found 53 outliers among 1000 measurements (5.30%)
  38 (3.80%) high mild
  15 (1.50%) high severe
all/xxhash/16384        time:   [1.0882 µs 1.0946 µs 1.1019 µs]
                        thrpt:  [13.848 GiB/s 13.940 GiB/s 14.022 GiB/s]
Found 88 outliers among 1000 measurements (8.80%)
  65 (6.50%) high mild
  23 (2.30%) high severe
Benchmarking all/xxhash/65536: Warming up for 3.0000 s
Warning: Unable to complete 1000 samples in 2.0s. You may wish to increase target time to 2.1s, enable flat sampling, or reduce sample count to 680.
all/xxhash/65536        time:   [4.1483 µs 4.1772 µs 4.2094 µs]
                        thrpt:  [14.500 GiB/s 14.611 GiB/s 14.713 GiB/s]
Found 91 outliers among 1000 measurements (9.10%)
  59 (5.90%) high mild
  32 (3.20%) high severe
all/xxhash/262144       time:   [16.689 µs 16.778 µs 16.891 µs]
                        thrpt:  [14.454 GiB/s 14.551 GiB/s 14.629 GiB/s]
Found 31 outliers among 1000 measurements (3.10%)
  22 (2.20%) high mild
  9 (0.90%) high severe
all/highwayhash/4       time:   [38.600 ns 38.740 ns 38.911 ns]
                        thrpt:  [98.036 MiB/s 98.469 MiB/s 98.827 MiB/s]
Found 80 outliers among 1000 measurements (8.00%)
  39 (3.90%) high mild
  41 (4.10%) high severe
all/highwayhash/16      time:   [40.832 ns 41.035 ns 41.257 ns]
                        thrpt:  [369.84 MiB/s 371.85 MiB/s 373.70 MiB/s]
Found 86 outliers among 1000 measurements (8.60%)
  29 (2.90%) high mild
  57 (5.70%) high severe
all/highwayhash/64      time:   [31.758 ns 32.053 ns 32.362 ns]
                        thrpt:  [1.8418 GiB/s 1.8596 GiB/s 1.8769 GiB/s]
Found 9 outliers among 1000 measurements (0.90%)
  7 (0.70%) high mild
  2 (0.20%) high severe
Benchmarking all/highwayhash/256: Collecting 1000 samples in estimated 2.0204 s (45M iterations
all/highwayhash/256     time:   [42.813 ns 42.965 ns 43.135 ns]
                        thrpt:  [5.5273 GiB/s 5.5492 GiB/s 5.5688 GiB/s]
Found 78 outliers among 1000 measurements (7.80%)
  3 (0.30%) low mild
  42 (4.20%) high mild
  33 (3.30%) high severe
Benchmarking all/highwayhash/1024: Collecting 1000 samples in estimated 2.0482 s (20M iteration
all/highwayhash/1024    time:   [106.14 ns 107.00 ns 107.90 ns]
                        thrpt:  [8.8386 GiB/s 8.9133 GiB/s 8.9852 GiB/s]
Found 128 outliers among 1000 measurements (12.80%)
  63 (6.30%) high mild
  65 (6.50%) high severe
Benchmarking all/highwayhash/4096: Collecting 1000 samples in estimated 2.1329 s (6.0M iteratio
all/highwayhash/4096    time:   [356.07 ns 360.26 ns 364.80 ns]
                        thrpt:  [10.457 GiB/s 10.589 GiB/s 10.713 GiB/s]
Found 118 outliers among 1000 measurements (11.80%)
  17 (1.70%) high mild
  101 (10.10%) high severe
Benchmarking all/highwayhash/16384: Collecting 1000 samples in estimated 2.0187 s (1.5M iterati
all/highwayhash/16384   time:   [1.2538 µs 1.2591 µs 1.2656 µs]
                        thrpt:  [12.056 GiB/s 12.119 GiB/s 12.170 GiB/s]
Found 38 outliers among 1000 measurements (3.80%)
  18 (1.80%) high mild
  20 (2.00%) high severe
Benchmarking all/highwayhash/65536: Warming up for 3.0000 s
Warning: Unable to complete 1000 samples in 2.0s. You may wish to increase target time to 2.6s, enable flat sampling, or reduce sample count to 610.
Benchmarking all/highwayhash/65536: Collecting 1000 samples in estimated 2.6128 s (500k iterati
all/highwayhash/65536   time:   [5.0432 µs 5.0776 µs 5.1166 µs]
                        thrpt:  [11.929 GiB/s 12.021 GiB/s 12.102 GiB/s]
Found 73 outliers among 1000 measurements (7.30%)
  17 (1.70%) high mild
  56 (5.60%) high severe
Benchmarking all/highwayhash/262144: Collecting 1000 samples in estimated 2.0047 s (96k iterati
all/highwayhash/262144  time:   [20.093 µs 20.200 µs 20.317 µs]
                        thrpt:  [12.017 GiB/s 12.086 GiB/s 12.150 GiB/s]
Found 70 outliers among 1000 measurements (7.00%)
  29 (2.90%) high mild
  41 (4.10%) high severe
all/fnv-1a/4            time:   [3.7095 ns 3.7451 ns 3.7810 ns]
                        thrpt:  [1008.9 MiB/s 1018.6 MiB/s 1.0043 GiB/s]
Found 5 outliers among 1000 measurements (0.50%)
  4 (0.40%) high mild
  1 (0.10%) high severe
all/fnv-1a/16           time:   [13.648 ns 13.778 ns 13.910 ns]
                        thrpt:  [1.0712 GiB/s 1.0815 GiB/s 1.0918 GiB/s]
Found 5 outliers among 1000 measurements (0.50%)
  2 (0.20%) high mild
  3 (0.30%) high severe
all/fnv-1a/64           time:   [74.842 ns 75.370 ns 76.020 ns]
                        thrpt:  [802.89 MiB/s 809.81 MiB/s 815.52 MiB/s]
Found 30 outliers among 1000 measurements (3.00%)
  12 (1.20%) high mild
  18 (1.80%) high severe
all/fnv-1a/256          time:   [327.74 ns 330.25 ns 333.50 ns]
                        thrpt:  [732.06 MiB/s 739.26 MiB/s 744.93 MiB/s]
Found 56 outliers among 1000 measurements (5.60%)
  32 (3.20%) high mild
  24 (2.40%) high severe
all/fnv-1a/1024         time:   [1.3560 µs 1.3679 µs 1.3834 µs]
                        thrpt:  [705.92 MiB/s 713.92 MiB/s 720.16 MiB/s]
Found 47 outliers among 1000 measurements (4.70%)
  28 (2.80%) high mild
  19 (1.90%) high severe
Benchmarking all/fnv-1a/4096: Warming up for 3.0000 s
Warning: Unable to complete 1000 samples in 2.0s. You may wish to increase target time to 2.7s, enable flat sampling, or reduce sample count to 600.
all/fnv-1a/4096         time:   [5.4019 µs 5.4274 µs 5.4567 µs]
                        thrpt:  [715.86 MiB/s 719.72 MiB/s 723.12 MiB/s]
Found 51 outliers among 1000 measurements (5.10%)
  29 (2.90%) high mild
  22 (2.20%) high severe
all/fnv-1a/16384        time:   [21.098 µs 21.154 µs 21.234 µs]
                        thrpt:  [735.86 MiB/s 738.63 MiB/s 740.58 MiB/s]
Found 11 outliers among 1000 measurements (1.10%)
  8 (0.80%) high mild
  3 (0.30%) high severe
all/fnv-1a/65536        time:   [87.317 µs 87.629 µs 88.015 µs]
                        thrpt:  [710.10 MiB/s 713.24 MiB/s 715.79 MiB/s]
Found 66 outliers among 1000 measurements (6.60%)
  40 (4.00%) high mild
  26 (2.60%) high severe
all/fnv-1a/262144       time:   [353.22 µs 361.91 µs 373.20 µs]
                        thrpt:  [669.88 MiB/s 690.77 MiB/s 707.77 MiB/s]
Found 68 outliers among 1000 measurements (6.80%)
  20 (2.00%) high mild
  48 (4.80%) high severe

@Amanieu
Copy link
Member

Amanieu commented Dec 20, 2023

I think I know why the performance looks so different: it's because the AES instructions aren't enabled in the baseline target feature, which means that the compiler cannot inline functions marked with #[target_feature(enable = "aes")].

However, for hashbrown's default hasher we want something that works on all platforms and doesn't depend on optional CPU extensions. We don't need "secure" hashing like the standard library has, just something fast. We would use FxHash but the low bits of the hash it produces are poor (if your inputs are multiples of 4, so is the hash).

@ogxd
Copy link
Author

ogxd commented Dec 22, 2023

However, for hashbrown's default hasher we want something that works on all platforms and doesn't depend on optional CPU extensions

AHash is, by design, utilizing AES instructions for high-performance hashing, like GxHash does.
image

A difference however is that aHash has fallbacks so that it runs on every hardware, even when there are no AES hardware acceleration. It is planned to have a fallback as well for GxHash, but it's not ready yet. This is for sure mandatory for an usecase such as an hashbrown default hasher.

There is still work in progress before I publish new benchmark results here (ogxd/gxhash#34, ogxd/gxhash#44 and ogxd/gxhash#47).

Btw, I noticed that the benchmark may be biased because of inputs being optimized within the hash functions utilized, I have created another issue for this: #493.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants