每日 Harness 开源 · Source
返回本期 · Back to 2026-09-05

博客文章 · Blog Posts2026-09-05 · Saturday, September 5, 2026

The new Go JSON API: twice as fast, or 1.5x slower?

lemire.me原文 ↗

Lemire 在 Go 1.27 的 encoding/json/v2 上测得 twitter.json marshal 从 198 MB/s 到 374 MB/s,unmarshal 比旧实现快 1.5 - 2.3 倍。可是在 10,000 个 typed struct 的往返测试里,v2 marshal 约慢 1.5 倍,legacy engine 反而领先;性能收益由数据形状、方向和兼容语义决定。
–浏览

评论 · Comments