Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
Chrome 103
Mac OS X 10.15.7
Desktop
2 years ago
Test name Executions per second
Number(intString) 14271388.0 Ops/sec
+intString 998144320.0 Ops/sec
parseInt(intString) 14102651.0 Ops/sec
parseFloat(intString) 13646739.0 Ops/sec
Number(floatString) 14267174.0 Ops/sec
+floatString 996733632.0 Ops/sec
parseInt(floatString) 10287070.0 Ops/sec
parseFloat(floatString) 10224430.0 Ops/sec
Tests:
  • Number(intString)

  • +intString

  • parseInt(intString)

  • parseFloat(intString)

  • Number(floatString)

  • +floatString

  • parseInt(floatString)

  • parseFloat(floatString)


;