T

Benchmark created on


Setup

let acc1 = 0n;
let acc2 = 0n;

let nb1 = Array.from({length: 1000}, (_,i) => BigInt(i+1))
let nb2 = Array.from({length: 1000}, (_,i) => i+1)

Test runner

Ready to run.

Testing in
TestOps/sec
A
for(let i = 0; i < 1000; ++i)

   acc1 += (24n >> nb1[i])
ready
B
for(let i = 0; i < 1000; ++i)

   acc2 += BigInt(24 >> nb2[i])
ready

Revisions

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