Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Chrome 114
Windows
Desktop
one year ago
Test name Executions per second
notnot 2660880.8 Ops/sec
parseInt 1033624.2 Ops/sec
Number 1063064.8 Ops/sec
Script Preparation code:
AخA
 
var strA = "420343343242";
var strB = "420343343243";
Tests:
  • notnot

     
    var res = ~~strA > ~~strB;
  • parseInt

     
    var res = parseInt(strA) > parseInt(strB);
  • Number

     
    var res = Number(strA) > Number(strB);