Script Preparation code:
x
 
var bigInt32 = 2n ** 24n;
var bigInt64 = 2n ** 40n;
var bigInt128 = 2n ** 80n;
var bigIntNum = 2n ** 10n;
var int32 = 2 ** 10;
var int64 = 2 ** 40;
var float = Math.fround(2 ** 20);
var double = 2 ** 80;
var intNum = 2 ** 10;
const imul = Math.imul
const fround = Math.fround
Tests:
  • BigInt (32)

     
    let a = bigInt32;
    let b = bigIntNum;
    let c_sub, c_mod, c_mul, c_add;
    c_sub = a - b > a;
    c_mod = a % b < a;
    c_mul = a * b === a;
    c_add = a + b !== a;
  • BigInt (64)

     
    let a = bigInt64;
    let b = bigIntNum;
    let c_sub, c_mod, c_mul, c_add;
    c_sub = a - b > a;
    c_mod = a % b < a;
    c_mul = a * b === a;
    c_add = a + b !== a;
  • BigInt (128)

     
    let a = bigInt128;
    let b = bigIntNum;
    let c_sub, c_mod, c_mul, c_add;
    c_sub = a - b > a;
    c_mod = a % b < a;
    c_mul = a * b === a;
    c_add = a + b !== a;
  • Number (Int32)

     
    let a = int32;
    let b = intNum;
    let c_sub, c_mod, c_mul, c_add;
    c_sub = a - b > a;
    c_mod = a % b < a;
    c_mul = a * b === a;
    c_add = a + b !== a;
  • Number (Int32 asm.js)

     
    "use asm";
    let a = int32 | 0;
    let b = intNum | 0;
    let c_sub, c_mod, c_mul, c_add;
    c_sub = a - b > a;
    c_mod = a % b < a;
    c_mul = imul(a, b);
    c_add = a + b;
  • Number (maybe Int64)

     
    let a = int64;
    let b = intNum;
    let c_sub, c_mod, c_mul, c_add;
    c_sub = a - b > a;
    c_mod = a % b < a;
    c_mul = a * b === a;
    c_add = a + b !== a;
  • Number (Float asm.js)

     
    "use asm";
    let a = float;
    let b = fround(intNum);
    let c_sub, c_mod, c_mul, c_add;
    c_sub = fround(a - b) > a;
    c_mod = fround(a % b) < a;
    c_mul = fround(a * b) === a;
    c_add = fround(a + b) !== a;
  • Number (Double)

     
    let a = double;
    let b = intNum;
    let c_sub, c_mod, c_mul, c_add;
    c_sub = a - b > a;
    c_mod = a % b < a;
    c_mul = a * b === a;
    c_add = a + b !== a;
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    BigInt (32)
    BigInt (64)
    BigInt (128)
    Number (Int32)
    Number (Int32 asm.js)
    Number (maybe Int64)
    Number (Float asm.js)
    Number (Double)

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 16 days ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Chrome 135 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
BigInt (32) 175127632.0 Ops/sec
BigInt (64) 171538304.0 Ops/sec
BigInt (128) 166239408.0 Ops/sec
Number (Int32) 158601920.0 Ops/sec
Number (Int32 asm.js) 162291344.0 Ops/sec
Number (maybe Int64) 169008352.0 Ops/sec
Number (Float asm.js) 166076432.0 Ops/sec
Number (Double) 162630832.0 Ops/sec