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) 7698307.0 Ops/sec
+intString 869586496.0 Ops/sec
parseInt(intString) 7104329.0 Ops/sec
parseFloat(intString) 7192082.5 Ops/sec
Number(floatString) 7437919.5 Ops/sec
+floatString 882449728.0 Ops/sec
parseInt(floatString) 5650254.5 Ops/sec
parseFloat(floatString) 5615772.0 Ops/sec
Tests:
  • Number(intString)

  • +intString

  • parseInt(intString)

  • parseFloat(intString)

  • Number(floatString)

  • +floatString

  • parseInt(floatString)

  • parseFloat(floatString)