Tests:

Historical Performance Data aggregated from 30 community runs

Desktop Results:
Chrome 20 runs
concat
5.4M/s
template
5.3M/s
.toString()
1.6M/s
String()
849K/s

Fastest: concat (6.3x faster)

View exact numbers
  • concat: 5,352,386 ops/sec
  • template: 5,349,708 ops/sec
  • .toString(): 1,604,912 ops/sec
  • String(): 848,886 ops/sec
Firefox 10 runs
.toString()
4.1M/s
concat
3.8M/s
String()
3.6M/s
template
1.2M/s

Fastest: .toString() (3.5x faster)

View exact numbers
  • .toString(): 4,139,128 ops/sec
  • concat: 3,828,662 ops/sec
  • String(): 3,614,190 ops/sec
  • template: 1,186,858 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()
    concat
    template

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: yesterday)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:153.0) Gecko/20100101 Firefox/153.0
Firefox 153 on Windows
View result in a separate tab
.toString()
4.0M/s
concat
3.9M/s
String()
3.8M/s
template
1.4M/s
View exact numbers
Test name Executions per second
.toString() 4,010,818 Ops/sec
concat 3,893,603 Ops/sec
String() 3,834,582 Ops/sec
template 1,362,244 Ops/sec