Test name | Executions per second |
---|---|
outside | 78715120.0 Ops/sec |
inside | 79016392.0 Ops/sec |
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;
const condition = true;
let counter = 0;
for (let i = 0; i < 10; i++) counter += condition ? i : counter;