Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Multiplication vs Additions
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36
Browser:
Chrome 132
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Multiplication
84233.6 Ops/sec
Additions
1776.5 Ops/sec
Script Preparation code:
const randInt = () => Math.floor(Math.random() * 100); var arr = Array.from({ length: 10000 }, () => randInt());
Tests:
Multiplication
let total = 0; for (const v of arr) { total += 100 * v; } console.log(total);
Additions
let total = 0; for (const v of arr) { for (let i = 100; 0 < i--;) total += v; } console.log(total);