< 10000; i++) array.push(i); console.time('assign'); const assign = array.reduce( (acc, curr) => Object.assign(acc, {[curr]: curr}), {}); console.timeEnd('assign'); console.time('spread'); const spread = array.reduce( (acc, curr) => ({...acc, [curr]: curr}), {}); console.timeEnd('spread');