Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Object.Values + Map vs for-in push
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/134.0.0.0 Safari/537.36
Browser:
Chrome 134
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
for-in push
20865522.0 Ops/sec
Object.Values map
20350020.0 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
const record = { jhon: {name: "jhon", lastname: "smith"}, doe: {name: "jhon", lastname: "doe"}, maria: {name: "maria", lastname: "lagg"}, }
Tests:
for-in push
const array = []; for(const key in record){ const item = record[key]; array.push({firstName: item.name,lastName: item.lastname}); }
Object.Values map
const array = Object.values(record).map(item => ({firstName: item.name,lastName: item.lastname}));