Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36
Chrome 151
Mac OS X 10.15.7
Desktop
one month ago
Benchmark.js
Reduce (reuse object)
31K/s
For-of
31K/s
Object.fromEntries
19K/s
Reduce (creating temporary objects)
4K/s
View exact numbers
Test name Executions per second
Reduce (reuse object) 30,820 Ops/sec
For-of 30,559 Ops/sec
Object.fromEntries 18,977 Ops/sec
Reduce (creating temporary objects) 4,364 Ops/sec
Script Preparation code:
Tests: