Tests:
  • String()

  • .toString()

  • template string

  • add to string

  • Number to Number via +

  • String to Number via +

  • String to Number via parseInt

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    String()
    .toString()
    template string
    add to string
    Number to Number via +
    String to Number via +
    String to Number via parseInt

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Chrome 119 on Windows
View result in a separate tab
Test name Executions per second
String() 38276.6 Ops/sec
.toString() 497023.1 Ops/sec
template string 1232863.6 Ops/sec
add to string 899193.2 Ops/sec
Number to Number via + 13736742.0 Ops/sec
String to Number via + 6060011.5 Ops/sec
String to Number via parseInt 92866.9 Ops/sec