A Rust implementation of the [XXHash] algorithm.
```rust
use std::collections::HashMap; use std::collections::hash_state::DefaultState; use hash::XxHash;
let mut hash: HashMap<_, _, DefaultState
```rust use std::collections::HashMap; use hash::RandomXxHashState;
let mut hash: HashMap<_, _, RandomXxHashState> = Default::default(); hash.insert(42, "the answer"); assert_eq!(hash.get(&42), Some(&"the answer")); ```
| Bytes | SipHasher (MB/s) | XXHash (MB/s) | Ratio | |---------|------------------|---------------|---------| | 1 | 66 | 41 | 62% | | 4 | 210 | 166 | 79% | | 16 | 615 | 666 | 108% | | 32 | 800 | 1523 | 190% | | 128 | 1007 | 4129 | 410% | | 256 | 1057 | 5818 | 550% | | 512 | 1084 | 7111 | 656% | | 1024 | 1092 | 8062 | 738% | | 1048576 | 1113 | 9381 | 843% |
| Bytes | FnvHasher (MB/s) | XXHash (MB/s) | Ratio | |---------|-------------------------|---------------|-------| | 1 | 1000 | 40 | 4% | | 4 | 800 | 160 | 20% | | 16 | 761 | 640 | 84% | | 32 | 800 | 1523 | 190% | | 128 | 766 | 4129 | 539% | | 256 | 768 | 5688 | 741% | | 512 | 812 | 6826 | 841% | | 1024 | 771 | 7585 | 984% | | 1048576 | 794 | 9270 | 1168% |
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)