# std.hash: improve simple hashing of unsigned integers · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/aee6f7d7eed535597e4b506132e211b9dce311dd)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: aee6f7d7eed535597e4b506132e211b9dce311dd

Requested commit: aee6f7d7eed535597e4b506132e211b9dce311dd

Commit: aee6f7d7eed535597e4b506132e211b9dce311dd

Tree: dafd5dd769f1f0bf3bce341f79b63c596654dceb

Author: Francesco Alemanno

Committer: Andrew Kelley

## Message

```
std.hash: improve simple hashing of unsigned integers

Before, the default bit mixer was very biased, and after a
lot of searching it turns out that selecting a better solution is hard.

I wrote a custom statistical analysis taylored for bit mixers in order
to select the best one at each size (u64/u32/u16), compared a lot of
mixers, and packaged the best ones in this commit.

```

## Parents

- [e2f24a2d7096e4a28ba74513ed9473da0b7fb372](https://git.cafe/gitcafe/zig/commit/e2f24a2d7096e4a28ba74513ed9473da0b7fb372?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/aee6f7d7eed535597e4b506132e211b9dce311dd?format=markdown)
