Script Preparation code:
Tests:

Historical Performance Data aggregated from 26 community runs

Desktop Results:
Chrome 20 runs
toString
1.2M/s
JSON.stringify
1.1M/s
View exact numbers
  • toString: 1,179,894 ops/sec
  • JSON.stringify: 1,111,160 ops/sec
Firefox 6 runs
toString
5.1M/s
JSON.stringify
2.6M/s

Fastest: toString (2.0x faster)

View exact numbers
  • toString: 5,067,198 ops/sec
  • JSON.stringify: 2,566,501 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
    toString
    JSON.stringify

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 7 months ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.127 Safari/537.36 OPR/60.3.3004.55692
Opera 60 on Linux
View result in a separate tab
toString
247K/s
JSON.stringify
198K/s
View exact numbers
Test name Executions per second
toString 246,821 Ops/sec
JSON.stringify 197,729 Ops/sec