Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36
Chrome 136
Linux
Desktop
9 months ago
Test name Executions per second
Object.fromEntries 288.0 Ops/sec
Reduce (reuse object) 438.0 Ops/sec
creating temporary objects instead of arrays 196.7 Ops/sec
use an iterator to avoid unnecessary memory allocation 194.9 Ops/sec
Script Preparation code:
Tests:
  • Object.fromEntries

  • Reduce (reuse object)

  • creating temporary objects instead of arrays

  • use an iterator to avoid unnecessary memory allocation