Imul vs multiplication

Benchmark publishedon

Description

tests Math.imul(a,b) vs a * b

Setup

const max = 10_000;
const x = Array.from({length: 10_000}, (_,index) => Math.random() * max);
const y = Array.from({length: 10_000}, (_,index) => Math.random() * max);


Test Runner

Initializing...

Testing in
Test CaseOps/sec
Math.imul
x.forEach((value, index) => Math.imul(value, y[index]));
ready
a * b
x.forEach((value, index) => value * y[index]);
ready

Revisions

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

Revision 1
publishedon