Script Preparation code:
Tests:

Historical Performance Data aggregated from 5 community runs

Desktop Results:
Chrome 5 runs
JSON.stringify
12K/s
toString
9K/s

Fastest: JSON.stringify (1.3x faster)

View exact numbers
  • JSON.stringify: 11,806 ops/sec
  • toString: 8,846 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: 3 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.4 Safari/605.1.15
Safari 26 on Mac OS X 10.15.7
View result in a separate tab
toString
14K/s
JSON.stringify
14K/s
View exact numbers
Test name Executions per second
toString 14,481 Ops/sec
JSON.stringify 13,797 Ops/sec