hashing a small number to a random looking 64 bit integer

前端 未结 4 701
臣服心动
臣服心动 2021-01-12 16:54

I am looking for a hash-function which operates on a small integer (say in the range 0...1000) and outputs a 64 bit int.

The result-set should look like a random dis

4条回答
  •  不思量自难忘°
    2021-01-12 17:34

    Why not use an existing hash function, such as MurmurHash3 with a 64-bit finalizer? According to the author, the function takes tens of CPU cycles per key on current Intel hardware.

提交回复
热议问题