Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131
Linux
Desktop
one year ago
Benchmark.js
Reduce (reuse object)
13K/s
Object.fromEntries (with transform data)
2K/s
Reduce (creating temporary objects)
96/s
View exact numbers
Test name Executions per second
Reduce (reuse object) 13,023 Ops/sec
Object.fromEntries (with transform data) 2,076 Ops/sec
Reduce (creating temporary objects) 96 Ops/sec
Script Preparation code:
Tests: