Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Chrome 112
Windows
Desktop
one year ago
Test name Executions per second
Reduce + spread 5.2 Ops/sec
Loop (for...in) with .keys() 159.1 Ops/sec
Loop (for...in) with .entries() 220.8 Ops/sec
Script Preparation code:
Tests:
  • Reduce + spread

  • Loop (for...in) with .keys()

  • Loop (for...in) with .entries()

  • Reduce + mutate

  • Reduce + mutate with entries()

  • Map with fromEntries

  • Loop (for...in) with mutate

  • Loop (for...in) with mutate (Object.assign)

  • Loop (for...in) with mutate (save object[key])

  • Loop (for...in) with unsafe mutate

  • Object.fromEntries with map


;