Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
blablabla
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/128.0.0.0 Safari/537.36
Browser:
Chrome 128
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
assign
5041679.5 Ops/sec
spread
1451673.2 Ops/sec
Tests:
assign
const data = [1, 2, 3, 4, 5] const obj = data.reduce((acc, n, idx) => { acc[idx] = n return acc }, {})
spread
const data = [1, 2, 3, 4, 5] const obj = data.reduce((acc, n, idx) => { return { ...acc, [idx]: n } }, {})