Questions tagged [murmurhash]

MurmurHash is a non-cryptographic hash function suitable for general hash-based lookup.

Murmurhash generates roughly the same number of collisions as alternate hashes over a wide range of input data.

95 questions
2
votes
1 answer

Is the co-domain of Murmur Hash evenly distributed and all-encompassing?

Consider the version of Murmur Hash (v3) which returns a 32-bit unsigned integer. Can one assume the co-domain of this function to be evenly distributed between 0 and UINT32_MAX, and to encompass these two values? I'm looking to generate a…
Jon Smark
  • 2,528
  • 24
  • 31
2
votes
1 answer

Why won't Google's Cityhash gem install?

I am trying to use Ruby's FFI to attach to the Google cityhash gem; It is a 64 bit, and 128 bit, non-cryptographic hash, similar to the default Ruby hash function (murmur_hash 1), but is a bit more recent, and, more importantly, allows setting the…
Charles
  • 495
  • 1
  • 5
  • 12
2
votes
2 answers

how to set the seed value for ruby murmur hash

Is there a way to set the seed value for using the ruby hash function (i.e. murmur hash in 1.9, don't know JRuby?) so that I can get the same hash code every time I run the script (i.e. in parallel on multiple processes or on different nodes) so…
Charles
  • 495
  • 1
  • 5
  • 12
2
votes
0 answers

Is there a way to generate the same hash across multiple executions in Swift?

Apple's Hasher documentation tells that Hasher generates a different hash value on every execution and that hashes shouldn't persist across multiple executions. Do not save or otherwise reuse hash values across executions of your program. Hasher is…
maticzav
  • 880
  • 9
  • 17
2
votes
0 answers

R and Python''s feature hashing seem to give different results

I am using feature hashing to convert string variables to a hash for classification purposes. I noticed after some digging that though both R and Python implementation of MurmurHash3 feature hashing (R: FeatureHashing:hashed.model.matrix and…
Sam A.
  • 413
  • 4
  • 13
2
votes
0 answers

MurmurHash3 - Java and Python return different results on long input

I'm using a Java version of MurMurHash3 developed by Google (google.common.hash.HashFunction and google.common.hash.Hashing) to create n independent hash functions (using n different seeds) to hash an ID as long. Here a snippet of the code: …
Daniele
  • 69
  • 5
2
votes
2 answers

generating a hash for data larger than memory (without getting arrested)

Good afternoon Overflowers! ;) What I want to do: I'm interested in verifying transferred file integrity. How I approached it: I was considering using a hash code for this but there's one problem. The files can be extremely large so I need to be…
Jay
  • 13,803
  • 4
  • 42
  • 69
2
votes
1 answer

Cassandra, optimizing the in clause

I was thinking about a way of optimizing in-clause like id in (1,2,3,....)? Get a hold of Murmur3Partitioner hashing function group in-clause by values that result in the same hash like "id in (x1, x3, ...)" with x1 and x3 having the same…
Behzad Pirvali
  • 764
  • 3
  • 10
  • 28
2
votes
2 answers

difference between hashing on x86 or x64

I want to implement a hashmap into my code, so I decided to stick to murmurhash3 I currently only deliver my programs compiled for x86 and have tried to keep the code general so I've never had trouble running the programs on x64. Now I've looked at…
cppanda
  • 1,235
  • 1
  • 15
  • 29
2
votes
1 answer

Collision rate of two 32-bit hashes vs one 64-bit hash? (uncorrelated?)

I have seen a couple questions that ask "do two 16-bit hashes have the same collision rate as a 32-bit hash?" or "do two 32-bit hashes have the same collision rate as a 64-bit hash?" And it seems like the answer is "yes, if they're decent hash…
bryc
  • 12,710
  • 6
  • 41
  • 61
2
votes
0 answers

MessageDigest implementation of MurmurHash2

I want to use the MurmurHash2 algorithm (32bit) for download verification in a Java application. There exist various implementations on GitHub, but I want to use a MessageDigest implementation, as I am interested in how to "translate" a hashing…
user6945931
2
votes
1 answer

Is there any Delphi implementation of MurMurHash3?

Is there any Delphi implementation of MurMurHash 3? I tried implementing it myself, but my implementation is actually slower that the MurMurHash2. Is it normal? Is there any other implementation? This is mine: function MurMur3_32(const S:…
Alex
  • 91
  • 5
2
votes
2 answers

Too many collisions in hash function

I was trying to hash about 64million 64bit unique unsigned integers to 128 million buckets(27bit wide address). I tried Bob Jenkin's HashLittle and Murmur hash(Both these hash functions gives 32bit hashes which I masked to obtain 27bit address). In…
Jean
  • 21,665
  • 24
  • 69
  • 119
1
vote
1 answer

For 128 bit hash function, what is the best method to select?

For 128 bit hash method, there are several choices like, md5 and murmur3, which is the best?
Adam Lee
  • 24,710
  • 51
  • 156
  • 236
1
vote
1 answer

Integer hash function for concurrent map implementation golang

I am using concurrent map from this repo which only uses string as the key and it doesn't have any implementation for key as integer so I tried implementing it by just replacing all string into int64 and modify the hashing function. Here is the gist…
john
  • 11,311
  • 40
  • 131
  • 251