Number vs BigInt

Benchmark created on


Setup

let a = 100
let b = 250
let an = 100n
let bn = 250n

Test runner

Ready to run.

Testing in
TestOps/sec
Number
let n1 = a
let n2 = b
let c = n1 + n2
c = n1 * n2
c = n1 / n2
ready
BitInt
let n1 = an
let n2 = bn
let c = n1 + n2
c = n1 * n2
c = n1 / n2
ready
BigInt Clamped
let n1 = an
let n2 = bn
let c = BigInt.asIntN(64, n1 + n2)
c = BigInt.asIntN(64, n1 * n2)
c = BigInt.asIntN(64, n1 / n2)
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.