HTML Preparation code:
AخA
 
1
<!--your preparation HTML code goes here-->
Script Preparation code:
x
 
/*your preparation JavaScript code goes here
To execute async code during the script preparation, wrap it as function globalMeasureThatScriptPrepareFunction, example:*/
async function globalMeasureThatScriptPrepareFunction() {
    // This function is optional, feel free to remove it.
    // await someThing();
}
var arr = ['', '', ''];
const ARRAY_LENGTH = 10000;
Tests:
  • new Array + fill

     
    new Array(ARRAY_LENGTH).fill(0).map((_, index) => index)
  • Array.from

     
    Array.from({ length: ARRAY_LENGTH }, (_, index) => index)
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    new Array + fill
    Array.from

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 months ago)
Mozilla/5.0 (iPhone; CPU iPhone OS 18_2_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.2 Mobile/15E148 Safari/604.1
Mobile Safari 18 on iOS 18.2.1
View result in a separate tab
Test name Executions per second
new Array + fill 37061.2 Ops/sec
Array.from 67548.2 Ops/sec