Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Hashing algo
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:136.0) Gecko/20100101 Firefox/136.0
Browser:
Firefox 136
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
MurmurHash1
90198.5 Ops/sec
Cyrb53
493251.2 Ops/sec
SuperFastHash
88287.4 Ops/sec
Script Preparation code:
var str = '[["backgroundColor","rgba(0, 0, 0, 0.003)"],["border","none"],["boxShadow","inset 0 -2px 1px rgba(0, 0, 0, 0.03)"],["boxSizing","border-box"],["color","inherit"],["fontFamily","inherit"],["fontSize","24px"],["fontWeight","inherit"],["height","65px"],["lineHeight","1.4em"],["margin","0"],["outline","none"],["padding","16px 16px 16px 60px"],["placeholder",{"fontStyle":"italic","fontWeight":300,"color":"#e6e6e6"}],["position","relative"],["width","100%"]]'; function MurmurHash1(key, seed = 0) { var m = 3332679571, h = Math.imul(key.length, m) ^ seed; for(var i = 0, b = key.length & -4; i < b; i += 4) { h += key[i+3] << 24 | key[i+2] << 16 | key[i+1] << 8 | key[i]; h = Math.imul(h, m); h ^= h >>> 16; } switch(key.length & 3) { case 3: h += key[i+2] << 16; case 2: h += key[i+1] << 8; case 1: h += key[i]; h = Math.imul(h, m); h ^= h >>> 16; } h = Math.imul(h, m); h ^= h >>> 10; h = Math.imul(h, m); h ^= h >>> 17; return h >>> 0; }; function Cyrb53(key, seed = 0) { const A = 2654435761; const B = 1597334677; const C = 2246822507; const D = 3266489909; const E = 4294967296; const F = 2097151; let h1 = 0xdeadbeef ^ seed; let h2 = 0x41c6ce57 ^ seed; for (let index = 0, char; index < key.length; index++) { char = key.charCodeAt(index); h1 = Math.imul(h1 ^ char, A); h2 = Math.imul(h2 ^ char, B); } h1 = Math.imul(h1 ^ (h1 >>> 16), C) ^ Math.imul(h2 ^ (h2 >>> 13), D); h2 = Math.imul(h2 ^ (h2 >>> 16), C) ^ Math.imul(h1 ^ (h1 >>> 13), D); return E * (F & h2) + (h1 >>> 0); }; function SuperFastHash(key) { if (!key) {return 0} var hash = key.length, tmp, len = key.length >>> 2, p = 0; for (var i = 0; i < len; i++) { hash += key[p] | key[p+1] << 8; tmp = ((key[p+2] | key[p+3] << 8) << 11) ^ hash; hash = (hash << 16) ^ tmp; hash += hash >>> 11; p += 4; } switch(key.length & 3) { case 3: hash += key[p] | key[p+1] << 8; hash ^= hash << 16; hash ^= key[p+2] << 18; hash += hash >>> 11; break; case 2: hash += key[p] | key[p+1] << 8; hash ^= hash << 11; hash += hash >>> 17; break; case 1: hash += key[p]; hash ^= hash << 10; hash += hash >>> 1; break; } hash ^= hash << 3; hash += hash >>> 5; hash ^= hash << 4; hash += hash >>> 17; hash ^= hash << 25; hash += hash >>> 6; return hash >>> 0; };
Tests:
MurmurHash1
MurmurHash1(str);
Cyrb53
Cyrb53(str);
SuperFastHash
SuperFastHash(str);