Script Preparation code:
Tests:

Historical Performance Data aggregated from 7 community runs

Desktop Results:
Chrome 7 runs
json.stringify
101K/s
json.stringify + TextEncode
47K/s
structuredClone
36K/s
JSON
29K/s

Fastest: json.stringify (3.4x faster)

View exact numbers
  • json.stringify: 101,094 ops/sec
  • json.stringify + TextEncode: 47,100 ops/sec
  • structuredClone: 35,763 ops/sec
  • JSON: 29,478 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
    json.stringify + TextEncode
    structuredClone
    json.stringify
    JSON

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 11 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:142.0) Gecko/20100101 Firefox/142.0
Firefox 142 on Mac OS X 10.15
View result in a separate tab
json.stringify
79K/s
json.stringify + TextEncode
55K/s
JSON
26K/s
structuredClone
20K/s
View exact numbers
Test name Executions per second
json.stringify 78,653 Ops/sec
json.stringify + TextEncode 54,837 Ops/sec
JSON 25,627 Ops/sec
structuredClone 20,223 Ops/sec