Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131
Windows
Desktop
10 days ago
Test name Executions per second
Double negation (!!row.length) 153157.4 Ops/sec
Comparison (row.length > 0) 150694.2 Ops/sec
Double negation (!!row) 115213.0 Ops/sec
Boolean constructor 124618.1 Ops/sec
Script Preparation code:
Tests:
  • Double negation (!!row.length)

  • Comparison (row.length > 0)

  • Double negation (!!row)

  • Boolean constructor