BigInt vs Number

Benchmark published by System on

Description

Arithmetic with BigInt vs Number.

Setup

const n1 = 1000000;
const n2 = 2000000;
const b1 = 1000000n;
const b2 = 2000000n;

Test Runner

Initializing...

Testing in
Test CaseOps/sec
Number math
const res = n1 * n2 + n1 / 2;
ready
BigInt math
const res = b1 * b2 + b1 / 2n;
ready

Revisions

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

Revision 1
publishedby Systemon