Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Hungry js map vs forEach
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 26_3_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/145.0.7632.108 Mobile/15E148 Safari/604.1
Browser:
Chrome Mobile iOS 145
Operating system:
iOS 26.3.0
Device Platform:
Mobile
Date tested:
2 months ago
Test name
Executions per second
map
59229580.0 Ops/sec
forEach
497333984.0 Ops/sec
Script Preparation code:
// Create sample data var array = []; array.forEach( i => array.push(i) ); var manipulateFn = num => { return num * 2 * 3; }
Tests:
map
var newArray = array.map( i => manipulateFn(i));
forEach
array.forEach( i => { manipulateFn(i); });