Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36 Edg/133.0.0.0
Chrome 133
Windows
Desktop
one month ago
Test name Executions per second
if true then 4442367.0 Ops/sec
if not return 4465844.5 Ops/sec
Script Preparation code:
AخA
 
const bool = true;
let i = 0;
let j = 0;
Tests:
  • if true then

     
    (() => {
      if (bool) {
        i++;
        j = i + 1;
      }
    })();
  • if not return

     
    (() => {
      if (!bool) return;
      i++;
      j = i + 1;
    })();