Comparing Libraries to Parse JSON Data in C++
summary
Benchmarks compare five C++ JSON libraries: nlohmann, RapidJSON, simdjson, glaze and daw_json_link using a complex nested file run 10,000 times. Results show nlohmann is slow, RapidJSON and daw_json_link cluster together, glaze gives the fastest deserialization and overall binary output, while simdjson claims multi‑GB/s peaks but lacks built‑in serialization. Measured serialization rates hit ~38 MB/s, ~230 MB/s, ~420 MB/s and simdjson ~500 MB/s; simdjson collapses to ~45 MB/s when key order reverses. Tradeoffs: single-header APIs, zero-allocation parsing, streaming support and hardware‑dependent SIMD speed.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 2:09What is JSON
- 6:30Parsing phases
- 12:33Top-down vs bottom-up parsers
- 18:58Selecting JSON libraries
- 20:30nlohmann JSON overview
- 24:53RapidJSON features
- 27:49SimdJSON performance
- 32:24Glaze library design
- 36:25D-Json link capabilities
- 39:20Benchmarking results
- 42:13JSON key order impact
- 44:27Choosing the right library
- 45:30Q&A
related talks
59mThe Power Of Compile-Time Resources
42mSerialization in C++ has never been easier! But wait, there's more
57mAdventures in Serialization: A Flexible Approach for Embedded Systems in C++
45mPerformance Benchmarking with Celero
38mScaling Financial Transaction using 0MQ and JSON
01h 03mCompute More in Less Time Using C++ Simd Wrapper Libraries
47mExperiences with Facebook's C++ library
57mThis Videogame Programmer Used the STL and You Will Never Guess What Happened Next
