Tests:

Historical Performance Data aggregated from 158 community runs

Desktop Results:
Chrome 127 runs
template string
2.5M/s
.toString()
1.5M/s
String()
170K/s

Fastest: template string (14.6x faster)

View exact numbers
  • template string: 2,482,536 ops/sec
  • .toString(): 1,516,738 ops/sec
  • String(): 170,246 ops/sec
Firefox 24 runs
.toString()
3.6M/s
String()
3.0M/s
template string
2.2M/s

Fastest: .toString() (1.6x faster)

View exact numbers
  • .toString(): 3,573,263 ops/sec
  • String(): 2,956,701 ops/sec
  • template string: 2,176,562 ops/sec
Safari 7 runs
.toString()
2.2M/s
template string
2.1M/s
String()
187K/s

Fastest: .toString() (11.6x faster)

View exact numbers
  • .toString(): 2,169,481 ops/sec
  • template string: 2,119,883 ops/sec
  • String(): 187,374 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    String()
    .toString()
    template string

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 15 days ago)
Mozilla/5.0 (X11; Linux x86_64; rv:152.0) Gecko/20100101 Firefox/152.0
Firefox 152 on Linux
View result in a separate tab
.toString()
4.4M/s
template string
3.7M/s
String()
3.1M/s
View exact numbers
Test name Executions per second
.toString() 4,407,829 Ops/sec
template string 3,727,530 Ops/sec
String() 3,136,214 Ops/sec