Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Test map function for object list with direct call using key vs destructured key
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/135.0.0.0 Safari/537.36
Browser:
Chrome 135
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
11 months ago
Test name
Executions per second
Test direct call from object
3604757.8 Ops/sec
Test destructured call from object list
3528395.0 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
var objList = [...new Array(50)].map((_, i) => ({ [`key${i+1}`]: `${Math.random() * i}`, foo: `bar-${Math.random() * i}` }));
Tests:
Test direct call from object
objList.map((t) => t.foo);
Test destructured call from object list
objList.map(({ foo }) => foo);