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 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36
Browser:
Chrome Mobile 146
Operating system:
Android
Device Platform:
Mobile
Date tested:
one month ago
Test name
Executions per second
Multiplication
19327.6 Ops/sec
Additions
457.4 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);