Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
asdfasdfqer
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Browser:
Chrome 127
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
.map
67555.4 Ops/sec
for loop
44746.2 Ops/sec
Script Preparation code:
// Create sample data var array = new Array(1000).fill(1); var manipulateFn = (num, idx) => { return [num, idx]; }
Tests:
.map
var newArray = array.map(manipulateFn);
for loop
var newArray = []; for (let i=0; i<array.length; i++) { newArray.push(manipulateFn(array[i], i)); }