{
  "id": 21124516,
  "title": "structuredClone vs JSON.stringify: I Timed Both on Node 22",
  "url": "https://urgent.news/2026/11/21/structuredclone-vs-json-stringify-i-timed-both-on-node-22",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-21T22:17:25.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/raxxostudios/structuredclone-vs-jsonstringify-i-timed-both-on-node-22-mkj"
  },
  "original_language": "en",
  "account": "The comparison of structuredClone and JSON.stringify deep cloning methods in Node 22 reveals that the JSON method significantly outperforms structuredClone. Across three object sizes ranging from small to large, structuredClone was 1.6 to 1.75 times slower than JSON.stringify. This speed advantage comes at the cost of losing certain data types, such as functions and undefined values, which JSON.stringify also handles. The benchmark script tested the performance of both methods with varying object depths and sizes, ensuring accurate results by checking for equal output shapes and avoiding potential GC pauses or CPU throttling glitches. The consistent results across multiple runs and object sizes prove that this speed gap is real and not an artifact of the specific script execution. The results indicate that the choice between the two methods should depend on the specific use case and the trade-offs one is willing to make between performance and data fidelity.",
  "summary": "On Node 22, JSON.parse(JSON.stringify()) cloned objects 1.6 to 1.75 times faster than structuredClone across three sizes structuredClone handles Dates, Maps and circular references that the JSON method silently breaks or drops I benchmarked 20000, 2000 and 200 clone operations at three object depths, same count each run The JSON method still loses functions and undefined, so the speed win comes…",
  "key_points": [
    "JSON.stringify is significantly faster than structuredClone in Node 22",
    "structuredClone loses data types like functions and undefined values",
    "Benchmark results confirm speed gap is real and not script-specific"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}