Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36
Chrome 97
Mac OS X 10.15.7
Desktop
3 years ago
Test name Executions per second
1-1 1022556288.0 Ops/sec
1-2 1020495488.0 Ops/sec
2-1 1022064768.0 Ops/sec
2-2 1019774016.0 Ops/sec
3-1 964382784.0 Ops/sec
3-2 1020115968.0 Ops/sec
Tests:
  • 1-1

    AخA
     
    const x = 'y';
    x === 'true' || x === 'y';
  • 1-2

     
    const x = 'y';
    x === 'y' || x === 'true'
  • 2-1

     
    const x = 'true';
    x === 'true' || x === 'y';
  • 2-2

     
    const x = 'true';
    x === 'y' || x === 'true'
  • 3-1

     
    const x = 'anything else';
    x === 'true' || x === 'y';
  • 3-2

     
    const x = 'anything else';
    x === 'y' || x === 'true'