Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
List iteration performance test 1
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Browser:
Chrome 128
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Reduce
3893.2 Ops/sec
Map
9037.0 Ops/sec
Script Preparation code:
var data = [ ...Array.from({ length: 20000 }, (_, i) => ({ id: (20 + i).toString(), name: `Task ${20 + i}`, start_date: `2024-${String(Math.floor(Math.random() * 12) + 1).padStart(2, '0')}-01`, end_date: `2024-${String(Math.floor(Math.random() * 12) + 1).padStart(2, '0')}-28`, budgeted_hours: Math.floor(Math.random() * 100) + 1, status: "some status" })), ];
Tests:
Reduce
const result = data.reduce((acc, audit) => { acc.push({ id: audit.id, title: audit.name, startDate: audit.start_date, endDate: audit.end_date, budgetedHours: audit.budgeted_hours, status: audit.status, }); return acc; }, []);
Map
const result = data.map((audit, i) => { return { id: audit.id, title: audit.name, startDate: audit.start_date, endDate: audit.end_date, budgetedHours: audit.budgeted_hours, status: audit.status, } });