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:*/
let test = 0;
function globalMeasureThatScriptPrepareFunction() {
    test = Math.random();
}
const ar = Array(100000);
Tests:
  • FOR

     
    for (let i= 0; i < ar.length; i++) {
        globalMeasureThatScriptPrepareFunction();
    }
  • FOREACH

     
    ar.forEach(() => {
        globalMeasureThatScriptPrepareFunction();
    });
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    FOR
    FOREACH

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 27 days ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 OPR/117.0.0.0
Opera 117 on Windows
View result in a separate tab
Test name Executions per second
FOR 1534.8 Ops/sec
FOREACH 19818.9 Ops/sec