1. 4
  1.  

  2. 2

    This is great stuff, thanks for posting! A few years ago I compiled some 32- and 64-bit integer permutations here:

    https://github.com/senderista/hashtable-benchmarks/tree/master/src/main/java/hash/int32 https://github.com/senderista/hashtable-benchmarks/tree/master/src/main/java/hash/int64

    I think integer permutations are underused for integer sets/maps. There’s no reason to use a hash function for this, when you can guarantee no collisions by using a permutation instead, in half the space you need with a hash function to prevent collisions with 50% probability, or 1/3 the space to prevent collisions WHP. And as a bonus, you don’t need to store the actual values at all, because they can be recovered by inverting the permuted values!