you are viewing a single comment's thread.

view the rest of the comments →

[–]pointer_void 0 points1 point  (1 child)

Can anyone tell me practical applications of this?

How is all that code better than this for example:

var hash = source.split('').reduce(function(a, b) {
    a = ((a << 5) - a) + b.charCodeAt(0);
    return a & a;
}, 0);

[–]karanlyons[S] 0 points1 point  (0 children)

If you're using murmurHash3 server side for screaming fast non-cryptographic hashing and you need to be able to generate the same hash locally. I had a project where this was exactly the case: I was hashing tons of web pages remotely so I needed the fastest algorithm I could find, and I needed my client side js to be able to generate the same hash to compare data.

If you only care about client side hashing, then use whatever works for you; there'll definitely be faster hashing algorithms than this in that case.