Tests:
  • outside

    AخA
     
    const condition = true;
    let counter = 0;
    if (condition)
    for (let i = 0; i < 10; i++) counter += i;
    else
    for (let i = 0; i < 10; i++) counter += counter;
  • inside

     
    const condition = true;
    let counter = 0;
    for (let i = 0; i < 10; i++) counter += condition ? i : counter;
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    outside
    inside

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36 Edg/83.0.478.45
Chrome 83 on Windows
View result in a separate tab
Test name Executions per second
outside 78715120.0 Ops/sec
inside 79016392.0 Ops/sec