Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0
Firefox 133
Linux
Desktop
one year ago
Test name Executions per second
Object.fromEntries 149.3 Ops/sec
Reduce (reuse object) 1074.3 Ops/sec
Reduce (creating temporary objects) 0.2 Ops/sec
Map 395.3 Ops/sec
forEach 1327.0 Ops/sec
Object.assign 82.2 Ops/sec
Script Preparation code:
Tests:
  • Object.fromEntries

  • Reduce (reuse object)

  • Reduce (creating temporary objects)

  • Map

  • forEach

  • Object.assign