Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
Multiply Comparison
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/121.0.0.0 Mobile Safari/537.36
Browser:
Chrome Mobile 121
Operating system:
Android
Device Platform:
Mobile
Date tested:
2 years ago
Benchmark engine:
Benchmark.js
Standard multiply
11/s
Math.imul()
6/s
View exact numbers
Test name
Executions per second
✓
Standard multiply
11 Ops/sec
Math.imul()
6 Ops/sec
Script Preparation code:
var ints = [], prod, i; for (i = 0; i < 100000; i++) { ints[i] = Math.random() * Number.MAX_SAFE_INTEGER | 0; }
Tests:
Standard multiply
for (i = 0; i < 100000; i++) { prod = ints[i] * ints[i]; }
Math.imul()
for (i = 0; i < 100000; i++) { prod = Math.imul(ints[i], ints[i]); }