Good videos, with context.
Parsing JSON Really Quickly: Lessons Learned

Parsing JSON Really Quickly: Lessons Learned

InfoQ
3 HN recommenders · discussed 2020–2026
Open YouTube ↗

About this video

Daniel Lemire's QCon talk on how simdjson parses gigabytes of JSON per second. It covers SIMD vectorization, branch prediction and the lessons learned building a fast parser.

Why it appears in the archive

HN points to it as the best explanation of simdjson internals and of why fast parsing is rarely disk-bound.

AI-generated summary and labels from the source dataset; verify important details against the video. Source & credits.

From the Hacker News discussion

dehesa · 2020-05 · rec

I can relate. I have been one of those who started writing a CSV library and went down the rabbit hole of edge cases and configurability. Looking back (and only thinking on productivity) my time would have been better spent doing something else. I did, however, learn quite a lot along the way: - how text is represented in a computer (and all its caveats), - how to identify and tune slow code, - how to vectorize code (thanks to Daniel Lemire's [VIDEO] ), - how to encapsulate code better, - how to use some great CSV tools out there (thanks to Leon's [LINK] ) - how to better manage and communicate an open source project. All in all, I am still not sure it was a mistake. Moreover when Swift didn't really had, at the time, a good Codable interface to CSV. Next time I encounter a similar problem I will probably just wrap a C library and create a good interface, though. In any case, if you are coding in Swift and find yourself in need of a CSV encoder/decoder, you might want to check [LINK]

Read original comment ↗
Rendello · 2021-10 · rec

I find these optimizations fascinating. Anyone familiar with Lemire likely knows about this, but I listened to a podcast episode[1] with him a few days ago and learned about `simdjson`, the tool he authored that parses JSON at 25x the speed of the standard C++ library.[2][3] It's worth looking at if you're into this sort of thing. 1. [LINK] 2. [VIDEO] 3. [LINK]

Read original comment ↗
D4ckard · 2024-01 · rec

Daniel Lemire has an interesting talk on this: [VIDEO] . They key takeaway is that the disk is rarely the bottleneck.

Read original comment ↗
avian · 2020-08 · reference

The GitHub page links to a video that explains some of the internals [1]. Can someone comment on the result that they show at 14:26? My understanding is that they run a code that does 2000 branches based on a pseudo-random sequence. Over around 10 runs of that code, the CPU supposedly learns to correctly predict those 2000 branches and the performance steadily increases. Do the modern branch predictors really have the capability to remember an exact sequence of past 2000 decisions on the same branch instruction? Also, why would the performance increase incrementally like that? I would imagine that it would remember the loop history on the first run and achieve maximum performance on the second run. I doubt that there's really a neural net in the silicon doing this as the author speculates. [1] [VIDEO]

Read original comment ↗
ubedan · 2026-07 · reference

Github: [LINK] It showcases an especially ingenious scheme for escaping json strings, as well as the other tokens necessary to parse json. Daniel Lemire - One of the authors at QCon 2019: [VIDEO] Another Youtube video that explains it: [LINK]

Read original comment ↗