Tests:
  • nested loops

    x
     
    const array = [1, 2, 3, 4, 5, 1];
    let flag = false
     const truth = () => {
       for (i = 0; i < array.length  ,!flag; i++)
         for (j = 0; j < array.length; j++)
           array[i] == array[j] && (flag = true);
     };
     truth()
  • without loops

     
    const array = [1, 2, 3, 4, 5, 1];
    const truth = () => {
         let settedArray = new Set(array)
         return settedArray.size == array.length
     }
     truth()
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    nested loops
    without loops

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/113.0
Firefox 113 on Windows
View result in a separate tab
Test name Executions per second
nested loops 1964899.9 Ops/sec
without loops 1322669.6 Ops/sec