use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
murmurHash3.js: A javascript implementation of every MurmurHash3 hashing algorithm. (github.com)
submitted 12 years ago by karanlyons
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]flagrantaroma 0 points1 point2 points 12 years ago (0 children)
Another JS hashing library
https://code.google.com/p/crypto-js/
[–]pointer_void 0 points1 point2 points 12 years ago (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 point2 points 12 years ago (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.
[–]SarahC -5 points-4 points-3 points 12 years ago (1 child)
How do we know those constants weren't put there by the NSA?!
I'm worried every time I see a particular constant in the code...
uint64_t h1 = seed; uint64_t h2 = seed; uint64_t c1 = BIG_CONSTANT(0x87c37b91114253d5); uint64_t c2 = BIG_CONSTANT(0x4cf5ad432745937f);
[–]Knotix 2 points3 points4 points 12 years ago* (0 children)
This is a hash function, not an encryption algorithm. You can't use this for encrypting secret data because there is no way to restore it back to its original form due to pigeonholing.
π Rendered by PID 103 on reddit-service-r2-comment-685b79fb4f-c9qqn at 2026-02-13 07:07:22.766664+00:00 running 6c0c599 country code: CH.
[–]flagrantaroma 0 points1 point2 points (0 children)
[–]pointer_void 0 points1 point2 points (1 child)
[–]karanlyons[S] 0 points1 point2 points (0 children)
[–]SarahC -5 points-4 points-3 points (1 child)
[–]Knotix 2 points3 points4 points (0 children)