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) 8409892.0 Ops/sec
+intString 901292224.0 Ops/sec
parseInt(intString) 8036231.0 Ops/sec
parseFloat(intString) 8150600.0 Ops/sec
Number(floatString) 8370384.0 Ops/sec
+floatString 901166080.0 Ops/sec
parseInt(floatString) 5941976.5 Ops/sec
parseFloat(floatString) 5959648.0 Ops/sec
Tests:
  • Number(intString)

  • +intString

  • parseInt(intString)

  • parseFloat(intString)

  • Number(floatString)

  • +floatString

  • parseInt(floatString)

  • parseFloat(floatString)