Tests:

Historical Performance Data aggregated from 182 community runs

Desktop Results:
Chrome 132 runs
.toString()
1.5M/s
String()
197K/s

Fastest: .toString() (7.5x faster)

View exact numbers
  • .toString(): 1,474,444 ops/sec
  • String(): 197,455 ops/sec
Firefox 39 runs
.toString()
2.6M/s
String()
2.5M/s
View exact numbers
  • .toString(): 2,639,014 ops/sec
  • String(): 2,480,375 ops/sec
Safari 6 runs
.toString()
3.0M/s
String()
1.0M/s

Fastest: .toString() (3.0x faster)

View exact numbers
  • .toString(): 3,025,818 ops/sec
  • String(): 1,001,743 ops/sec
Mobile Results:
Chrome 5 runs
.toString()
227K/s
String()
133K/s

Fastest: .toString() (1.7x faster)

View exact numbers
  • .toString(): 227,437 ops/sec
  • String(): 132,622 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()

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 5 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36 Edg/145.0.0.0
Chrome 145 on Mac OS X 10.15.7
View result in a separate tab
.toString()
1.8M/s
String()
1.1M/s
View exact numbers
Test name Executions per second
.toString() 1,780,528 Ops/sec
String() 1,133,497 Ops/sec