按年被提到
20192021 · 2 次2026
算法与数据结构›哈希、压缩与向量化·arXiv:1902.08318 · cs.DB

Parsing Gigabytes of JSON per Second

每秒解析数 GB 的 JSON(simdjson)
Geoff Langdale, Daniel Lemire · 2019

simdjson:用 SIMD 指令让单核每秒解析数 GB 的 JSON

开始阅读 ↗PDFalphaXiv 讨论
被推荐 · 8 人首次 2019-07-27 · 最近 2026-10-25
8不同的人
8活跃月份
9讨论串
79被引(OpenAlex)

JSON 是网络上无处不在的数据交换格式,数据量大时解析会成为性能瓶颈。作者表明,即使这个问题已相当成熟,仍能大幅提速:提出首个符合标准、在商用处理器单核上每秒处理数 GB 数据的 JSON 解析器,所用指令数可低至 RapidJSON 等先进参考解析器的四分之一或更少。与其他验证型解析器不同,其软件 simdjson 大量使用单指令多数据(SIMD)指令,并以宽松许可证开源以保证可复现。

HN 为什么提它

HN 上的人称这篇论文写得非常好、例子丰富,把它作为用 SIMD 加速解析的代表,很多后来的项目都借鉴了其中的技术。

方法难度 4 / 5约 45 分钟经得起时间
读之前最好知道
1JSON 格式与解析器基础
2SIMD 指令(如 AVX2)
3CPU 流水线与分支预测
4位操作与位掩码技巧

学习路径

读这篇之前,按顺序读书架上的 2 篇 · 参考文献来自 OpenAlex,顺序和要点由 Claude Code 排出

候选里与 simdjson 直接相关的只有两篇:同一作者关于利用 SIMD 与特殊指令加速字节处理的工作,用来熟悉指令级并行的思路。

  1. 1

    同一作者用 AVX2 做 Base64 编解码,展示用 SIMD 批量处理字节的基本手法。

    读如何用向量指令一次处理多个字节与查表替代分支。

  2. 2
    Faster 64-bit universal hashing using carry-less multiplications用无进位乘法实现更快的 64 位通用哈希 · 2015

    展示无进位乘法(CLMUL)指令的使用,simdjson 也用类似指令处理引号区域位掩码。

    读CLMUL 指令的作用;只看它如何把位运算映射到硬件指令。

  3. 3
    Parsing Gigabytes of JSON per Second每秒解析数 GB 的 JSON(simdjson) · 2019 · 就是这篇

    目标论文:用 SIMD 先做结构字符与字符串边界的分类,再构建解析,让单核达到每秒数 GB。

    读两阶段设计(先找结构字符、再解析)、减少分支的技巧、UTF-8 校验与数字解析。

HN 书评

推荐在前,同类按时间 · 每篇最多保留 20 条,统计用全部提及
推荐Rendello · 2021-10

“It's worth looking at if you're into this sort of thing.”

推荐感兴趣的人读这篇 simdjson 论文
Word-Aligned Bloom Filters原评论 ↗
推荐winwang · 2024-03

“the simdjson paper uses similar techniques, is extremely well-written and has great examples.”

推荐 simdjson 论文,称技术相似、写得极好且例子丰富
1BRC merykitty's magic SWAR: 8 lines of code explained in 3k words原评论 ↗
引用aristus · 2019-07

“He's probably tired of copy-pasting the specs of his reference hardware (Skylake Parsing Gigabytes of JSON per Second)”

提到作者的基准参考硬件是 Skylake,已厌倦重复贴规格
How fast can a BufferedReader read lines in Java?原评论 ↗
引用0x000xca0xfe · 2025-08

“Some real-world examples in simdjson: Parsing Gigabytes of JSON per Second”

贴出 simdjson 论文,其中有真实世界的例子
Condor's Cuzco RISC-V Core at Hot Chips 2025原评论 ↗
引用Rendello · 2026-09

“Other names to look out for are the previously aforementioned Wojciech Muła, as well as Daniel Lemire (of simdjson [4][5]).”

点名值得关注的人,Daniel Lemire 是 simdjson 的作者
Bitap: My favorite string matching algorithm原评论 ↗
引用trevorah · 2026-10

“Under the hood, it borrows a lot from this paper on using simd for json parsing: Parsing Gigabytes of JSON per Second”

指出底层大量借鉴了这篇用 SIMD 解析 JSON 的论文
Show HN: simdown – use SIMD to parse Markdown at ~1 GB/s原评论 ↗
被提交为 story · 3 次