PulseAugur
中
实时 23:25:40
English(EN) structuredClone vs JSON.stringify: I Timed Both on Node 22

在 Node 22 基准测试中,JSON.parse(JSON.stringify()) 的性能优于 structuredClone

Node 22 上的一项最新基准测试表明,用于深度克隆对象的传统 JSON.parse(JSON.stringify()) 方法比新的 structuredClone 函数快得多。在各种对象大小和深度下,JSON 方法都证明了其 1.6 到 1.75 倍的优势。然而,structuredClone 提供了更广泛的兼容性,能够正确处理 Date 和 Map 等数据类型,并保留循环引用,而 JSON 方法无法做到这一点或会静默丢弃。JSON 方法的性能优势在涉及大量克隆操作的场景中最具意义。 AI

排序理由 这是一项关于 JavaScript 方法的技术比较和基准测试,并非发布或重要的行业事件。

在 dev.to — Claude Code tag 阅读 →

AI 生成摘要 · Google Gemini · 来自 1 个来源。 我们如何撰写摘要 →

在 Node 22 基准测试中,JSON.parse(JSON.stringify()) 的性能优于 structuredClone

本文如何被排名

Signal score
1 / 100
Composite score across the factors below. Higher = stronger signal that this story matters right now.
Newsworthiness bucket
Commentary
这是一项关于 JavaScript 方法的技术比较和基准测试,并非发布或重要的行业事件。
Source corroboration
Single-source cluster
Only one publisher covered this so far. Single-source stories can still rank when the publisher is high-authority, but they lack cross-source corroboration.
Topics
infra
Editorial topic classification. Feeds into how the story surfaces on /topic/<slug> hub pages and into the per-entity coverage mix.
AI-industry relevance
Low
Off-topic or adjacent — cluster remains reachable but doesn't surface in AI-industry rankings.
Story freshness
Breaking (< 6h)
Fresh story with cross-source coverage still developing. Ranking may shift as more sources report.

完整方法见我们的编辑标准。

报道来源 [1]

  1. dev.to — Claude Code tag TIER_1 English(EN) · RAXXO Studios ·

    structuredClone 对比 JSON.stringify:我在 Node 22 上测试了两者

    <ul> <li><p>On Node 22, JSON.parse(JSON.stringify()) cloned objects 1.6 to 1.75 times faster than structuredClone across three sizes</p></li> <li><p>structuredClone handles Dates, Maps and circular references that the JSON method silently breaks or drops</p></li> <li><p>I benchma…