Tests:

Historical Performance Data aggregated from 24 community runs

Desktop Results:
Chrome 24 runs
template string
161.0M/s
JSON.stringify array
9.0M/s
JSON.stringify object
7.1M/s

Fastest: template string (22.8x faster)

View exact numbers
  • template string: 161,005,760 ops/sec
  • JSON.stringify array: 9,003,158 ops/sec
  • JSON.stringify object: 7,074,654 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
    template string
    JSON.stringify array
    JSON.stringify object

    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
template string
93.7M/s
JSON.stringify array
256K/s
JSON.stringify object
203K/s
View exact numbers
Test name Executions per second
template string 93,713,312 Ops/sec
JSON.stringify array 255,905 Ops/sec
JSON.stringify object 202,542 Ops/sec