Script Preparation code:
AخA
 
var bigInt1 = 10000000000000000000000000000n
var bigInt2 = 10000000000000000000000000005n
var number1 = 1000000
var number2 = 1000005
Tests:
  • BigInt

    x
     
    a = bigInt1
    b = bigInt2
    c = a - b
    d = a < b
  • Number

     
    a = number1
    b = number2
    c = a - b
    d = a < b
  • BigInt cast to Number compare

     
    a = bigInt1
    b = bigInt2
    c = a - b
    cn = Number(c)
    d = cn < 10
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    BigInt
    Number
    BigInt cast to Number compare

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
Chrome 108 on Windows
View result in a separate tab
Test name Executions per second
BigInt 551231.1 Ops/sec
Number 587630.0 Ops/sec
BigInt cast to Number compare 441811.5 Ops/sec