Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Object.fromEntries performance test CR hello world unique name madafaka
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36
Browser:
Chrome 139
Operating system:
Linux
Device Platform:
Desktop
Date tested:
7 months ago
Test name
Executions per second
Object.fromEntries
2106.5 Ops/sec
Reduce (reuse object)
6666.2 Ops/sec
Reduce (creating temporary objects)
59.6 Ops/sec
Script Preparation code:
var data = { ...Array.from(Array(10000).keys()) };
Tests:
Object.fromEntries
Object.fromEntries(Object.keys(data).map((key) => [key, null]));
Reduce (reuse object)
Object.keys(data).reduce((acc, key) => { acc[key] = null; return acc; }, {});
Reduce (creating temporary objects)
Object.keys(data).reduce((acc, key) => ({ ...acc, [key]: null }), {});