Skip to content

Commit

Permalink
Add quality bench information in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ogxd committed Nov 13, 2024
1 parent 7188ffb commit e8deec8
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
```rust
Bench GxHash
βœ… avalanche::<B,4>()
...
βœ… avalanche::<B,512>()
βœ… distribution_values::<B,4>(128*128)
...
βœ… distribution_values::<B,512>(128*128)
βœ… distribution_bits::<B,4>()
...
βœ… collisions_padded_zeroes::<B>(128*128)
βœ… collisions_flipped_bits::<B,2>(9)
...
βœ… collisions_permute::<B,u8>(4,&Vec::from_iter(0..16))
...
βœ… collisions_permute::<B,u128>(42,&Vec::from_iter(0..64))
βœ… collisions_powerset_bytes::<B>(&[0,1,2,3,4,5,6,7,8,9])
...
βœ… hasher_collisions_permute::<B,u8>(&[0,1,2,3,4,5,6,7,8,9])
...
❌ some_quality_criterion::<B,32>(3)
| Score: 0.0000143. Expected is 0.
```

## Contributing

- Feel free to submit PRs
Expand Down

0 comments on commit e8deec8

Please sign in to comment.