Script Preparation code:
AخA
 
var data = Object.entries({ ...Array.from(Array(10000).keys()) });
Tests:
  • reduce with same obj

     
    data.reduce((map, [price, vol]) => {
      map[price] = vol;
      return map;
    }, {});
  • fromEntries

     
    Object.fromEntries(data);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    reduce with same obj
    fromEntries

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
Chrome 103 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
reduce with same obj 8969.2 Ops/sec
fromEntries 2288.9 Ops/sec