Keats / tera2

28 stars 3 forks source link

Switch hash impl to `AHash` #14

Closed jalil-salame closed 8 months ago

jalil-salame commented 9 months ago

AHash is about 8-9% faster than SipHash for our usecase (SipHash is the default hashing algorithm used by std::collections::HashMap).

In the serialization bench, it is about 20% faster.

Also added clippy lints to prevent introducing std::collections::HashMap back into the codebase.

This is in contrast to #13 which uses hashbrown::HashSet/Map. hashbrown is strictly faster on my Intel CPU.

This PR is for you to compare it yourself against #13 . IMO #13 is better.

jalil-salame commented 8 months ago

Closed in favor of #13