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) 8421942.0 Ops/sec
+intString 906268352.0 Ops/sec
parseInt(intString) 7951021.5 Ops/sec
parseFloat(intString) 8130626.0 Ops/sec
Number(floatString) 8396692.0 Ops/sec
+floatString 907412224.0 Ops/sec
parseInt(floatString) 5931134.5 Ops/sec
parseFloat(floatString) 5935968.5 Ops/sec
Tests:
  • Number(intString)

  • +intString

  • parseInt(intString)

  • parseFloat(intString)

  • Number(floatString)

  • +floatString

  • parseInt(floatString)

  • parseFloat(floatString)