Script Preparation code:
x
 
s64 = new BigInt64Array(new ArrayBuffer(24));
let bufHi = new ArrayBuffer(12);
let bufLo = new ArrayBuffer(12);
u32Lo = new Uint32Array(bufLo);
u32Hi = new Uint32Array(bufHi);
s32Lo = new Int32Array(bufLo);
s32Hi = new Int32Array(bufHi);
Tests:
  • Using Int32Array / Uint32Array

     
    let r = 0;
    if (s32Hi[1] < s32Hi[2]) {
      r = 1;
    } else if (s32Hi[1] === s32Hi[2]) {
      r = (u32Lo[1] < u32Lo[2]) ? 1 : 0;
    }
    s32Lo[0] = r;
    s32Hi[0] = 0;
  • Using BigIntArray

     
    const r = s64[1] < s64[2] ? 1n : 0n;
    s64[0] = r;
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Using Int32Array / Uint32Array
    Using BigIntArray

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Chrome 114 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
Using Int32Array / Uint32Array 2336974.2 Ops/sec
Using BigIntArray 6298671.0 Ops/sec