From 72be92dbef5f21629d3c760cf7436d2cd4e99282 Mon Sep 17 00:00:00 2001 From: Olivier Giniaux Date: Wed, 13 Nov 2024 22:13:39 +0100 Subject: [PATCH] Add quality bench information in readme --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.md b/README.md index 996df14..d8e6d02 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,38 @@ The `throughput` benchmark is custom (it does not rely on criterion.rs). In an a ![x86_64](./benches/throughput/x86_64.svg) ![x86_64-hybrid](./benches/throughput/x86_64-hybrid.svg) +### Quality + +This repository includes some of the SMHasher quality tests rewritten in Rust. This allows us to easily assess the quality of GxHash and other hash functions and on different platforms. +```bash +cargo bench --bench quality +``` + +This will output the results like this: +```bash +Bench GxHash + ✅ avalanche::() + ... + ✅ avalanche::() + ✅ distribution_values::(128*128) + ... + ✅ distribution_values::(128*128) + ✅ distribution_bits::() + ... + ✅ collisions_padded_zeroes::(128*128) + ✅ collisions_flipped_bits::(9) + ... + ✅ collisions_permute::(4,&Vec::from_iter(0..16)) + ... + ✅ collisions_permute::(42,&Vec::from_iter(0..64)) + ✅ collisions_powerset_bytes::(&[0,1,2,3,4,5,6,7,8,9]) + ... + ✅ hasher_collisions_permute::(&[0,1,2,3,4,5,6,7,8,9]) + ... + ❌ some_quality_criterion::(3) + | Score: 0.0000143. Expected is 0. +``` + ## Contributing - Feel free to submit PRs