Script Preparation code:
x
 
const alphabet = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"];
function generateItems(numberOfItems){
    const result = [];
    for ( var i = 0; i < numberOfItems ; i++ ) {
        result.push( alphabet[Math.floor(Math.random() * alphabet.length)]);
    }
    return result;
}
const list = generateItems(1000000);
Tests:
  • Initial call

     
    function myFunc(){
        for(let i = 0; i < list.length -1; i ++){
            list[i] = list[i].toLowerCase()
        }
    }
  • Multiple calls

     
    function myFunc(){
        for(let i = 0; i < list.length -1; i ++){
            list[i] = list[i].toLowerCase()
        }
        for(let i = 0; i < list.length -1; i ++){
            list[i] = list[i].toLowerCase()
        }
        for(let i = 0; i < list.length -1; i ++){
            list[i] = list[i].toLowerCase()
        }
    }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Initial call
    Multiple calls

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36
Chrome 90 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
Initial call 881426624.0 Ops/sec
Multiple calls 885384704.0 Ops/sec