Script Preparation code:
AخA
 
var array = (new Array(10000)).map((e, i) => ({t: i}));
Tests:
  • .map(callback)

     
    const result = array.map(() => true);
  • .fill(value)

     
    const result = new Array(array.length).fill(true);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    .map(callback)
    .fill(value)

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
Chrome 83 on Linux
View result in a separate tab
Test name Executions per second
.map(callback) 21477.0 Ops/sec
.fill(value) 14152.2 Ops/sec