Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0
Chrome 122
Windows
Desktop
9 months ago
Test name Executions per second
Number(intString) 20652108.0 Ops/sec
+intString 301497728.0 Ops/sec
parseInt(intString) 20532782.0 Ops/sec
parseFloat(intString) 20020558.0 Ops/sec
Number(floatString) 20668078.0 Ops/sec
+floatString 310932736.0 Ops/sec
parseInt(floatString) 20330774.0 Ops/sec
parseFloat(floatString) 13724247.0 Ops/sec
Tests:
  • Number(intString)

  • +intString

  • parseInt(intString)

  • parseFloat(intString)

  • Number(floatString)

  • +floatString

  • parseInt(floatString)

  • parseFloat(floatString)