Script Preparation code:
AخA
 
let s10MB = "0123456789".repeat(1000*1000);
var strings10MB = Array.from(Array(20)).map(o=>s10MB + String.fromCharCode(32+~~(Math.random()*96)))
Tests:
  • ===

     
    const s1 = strings10MB[~~(strings10MB.length*Math.random())];
    const s2 = strings10MB[~~(strings10MB.length*Math.random())];
    const b = s1 === s2;
  • murmurhash3_32_gc

    x
     
    function murmurhash3_32_gc(str) {
        var h1 = 0xdeadbeef;
        var k1 = 0;
        for (var i = 0; i < str.length; ++i) {
            k1 = str.charCodeAt(i);
            k1 = (k1 & 0x0000ffff) | ((k1 & 0xffff0000) >>> 16);
            k1 *= 0xcc9e2d51;
            k1 = (k1 << 15) | (k1 >>> 17);
            h1 ^= k1;
            h1 = (h1 << 13) | (h1 >>> 19);
            h1 = h1 * 5 + 0xe6546b64;
        }
        h1 ^= str.length;
        h1 ^= h1 >>> 16;
        h1 *= 0x85ebca6b;
        h1 ^= h1 >>> 13;
        h1 *= 0xc2b2ae35;
        h1 ^= h1 >>> 16;
        return h1 >>> 0; // Convert to unsigned 32-bit integer
    }
    const s1 = strings10MB[~~(strings10MB.length*Math.random())];
    const s2 = strings10MB[~~(strings10MB.length*Math.random())];
    const hash1 = murmurhash3_32_gc(s1);
    const hash2 = murmurhash3_32_gc(s2);
    const b = hash1 === hash2;
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    ===
    murmurhash3_32_gc

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 OPR/117.0.0.0
Opera 117 on Windows
View result in a separate tab
Test name Executions per second
=== 817.3 Ops/sec
murmurhash3_32_gc 10.3 Ops/sec