Tests:
  • Native

    AخA
     
    1/Math.sqrt(958573654687437984)
  • Fast inverse

    x
     
    var buf = new ArrayBuffer(4),
        f32=new Float32Array(buf),
        u32=new Uint32Array(buf);
        function squareRoot(x) {
        var x2 = 0.5 * (f32[0] = x);
        u32[0] = (0x5f3759df - (u32[0] >> 1));
        var y = f32[0];
        y  = y * ( 1.5 - ( x2 * y * y ) ); //newton's method
        return ~~(0.5 + y * x) << 0 ; //bitwise rounding method
        }
        squareRoot(958573654687437984);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Native
    Fast inverse

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
Chrome 87 on Windows
View result in a separate tab
Test name Executions per second
Native 7501597.5 Ops/sec
Fast inverse 1229363.2 Ops/sec