Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome 120
Windows
Desktop
one year ago
Test name Executions per second
undefined 4995221.0 Ops/sec
void 0 13683242.0 Ops/sec
constant containing undefined 7059856.5 Ops/sec
Script Preparation code:
AخA
 
var a = 1, u = void 0;
Tests:
  • undefined

     
    if(a===undefined)console.log(a);
  • void 0

     
    if(a===void 0)console.log(a);
  • constant containing undefined

     
    if(a===u)console.log(a);