Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0
Firefox 150
Linux
Desktop
one month ago
Test name Executions per second
Object.fromEntries 382.8 Ops/sec
Reduce (reuse object) 2842.0 Ops/sec
Reduce (creating temporary objects) 0.4 Ops/sec
Map 1008.0 Ops/sec
forEach 3416.9 Ops/sec
Object.assign 372.9 Ops/sec
Script Preparation code:
Tests:
  • Object.fromEntries

  • Reduce (reuse object)

  • Reduce (creating temporary objects)

  • Map

  • forEach

  • Object.assign