HackerTube
HomeLongsLikedHistoryWatch laterCategoriesPlaylistsSettings

Parsing JSON Really Quickly: Lessons Learned

InfoQ3 HN recommenders · recommended in 3 months, 2020-2026
YouTube
86K views · 6 years ago · talk · evergreen

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.

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

Software performance & optimizationCompilers, interpreters & program analysisAlgorithms & data structures#simdjson#simd#daniellemire#performance#parsing

5 comments from Hacker News

@ubedan2026 · in “GigaToken: ~1000x faster Language model tokenization”

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: ▶ this video Another Youtube video that explains it: link

CitesView on HN
@D4ckard2024 · in “The One Billion Row Challenge”

Daniel Lemire has an interesting talk on this: ▶ this video . They key takeaway is that the disk is rarely the bottleneck.

RecommendsView on HN
@Rendello2021 · in “Word-Aligned Bloom Filters”

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. ▶ this video 3. link

RecommendsView on HN
@avian2020 · in “Simdjson: Parsing gigabytes of JSON per second”

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] ▶ this video

CitesView on HN
@dehesa2020 · in “So you want to write your own CSV code (2014)”

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 ▶ this 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

RecommendsView on HN
JSON Parser 100% From Scratch in Haskell (only 111 lines)1:50:07

JSON Parser 100% From Scratch in Haskell (only 111 lines)

Tsoding
205K views • 6 years ago
Stephan T. Lavavej “Floating-Point <charconv>: Making Your Code 10x Faster With C++17's Final Boss”1:00:17

Stephan T. Lavavej “Floating-Point <charconv>: Making Your Code 10x Faster With C++17's Final Boss”

CppCon
41K views • 7 years ago
Bringing SIMD to the Web via Dart27:43

Bringing SIMD to the Web via Dart

InfoQ
11K views • 13 years ago
CppCon 2014: Chandler Carruth "Efficiency with Algorithms, Performance with Data Structures"1:13:41

CppCon 2014: Chandler Carruth "Efficiency with Algorithms, Performance with Data Structures"

CppCon
235K views • 12 years ago
A 10x faster TypeScript13:45

A 10x faster TypeScript

Microsoft Developer
608K views • 1 year ago
Making R run Fast - Jan Vitek1:21:39

Making R run Fast - Jan Vitek

John O'Neill
860 views • 10 years ago
How to Speed up a Python Program 114,000 times.59:11

How to Speed up a Python Program 114,000 times.

InfoQ
171K views • 13 years ago
CppCon 2016: Nicholas Ormrod “The strange details of std::string at Facebook"31:19

CppCon 2016: Nicholas Ormrod “The strange details of std::string at Facebook"

CppCon
122K views • 10 years ago
'Fastware' - Andrei Alexandrescu [ ACCU 2016 ]1:02:17

'Fastware' - Andrei Alexandrescu [ ACCU 2016 ]

ACCU Conference
34K views • 10 years ago
Hey Underscore, You're Doing It Wrong!36:31

Hey Underscore, You're Doing It Wrong!

InfoQ
141K views • 13 years ago
Simple Code, High Performance2:50:14

Simple Code, High Performance

Molly Rocket
463K views • 5 years ago
Chris Seaton @ VMSS16: JRuby+Truffle: Why it’s Important to Optimise the Tricky Parts1:02:44

Chris Seaton @ VMSS16: JRuby+Truffle: Why it’s Important to Optimise the Tricky Parts

softdevteamuk
5K views • 10 years ago
Rust at speed — building a fast concurrent database52:54

Rust at speed — building a fast concurrent database

Jon Gjengset
225K views • 7 years ago
CppCon 2017: Matt Kulukundis “Designing a Fast, Efficient, Cache-friendly Hash Table, Step by Step”59:34

CppCon 2017: Matt Kulukundis “Designing a Fast, Efficient, Cache-friendly Hash Table, Step by Step”

CppCon
137K views • 9 years ago
CppCon 2016: Chandler Carruth “High Performance Code 201: Hybrid Data Structures"55:49

CppCon 2016: Chandler Carruth “High Performance Code 201: Hybrid Data Structures"

CppCon
119K views • 10 years ago
Sorting Algorithms: Speed Is Found In The Minds of People - Andrei Alexandrescu - CppCon 20191:29:55

Sorting Algorithms: Speed Is Found In The Minds of People - Andrei Alexandrescu - CppCon 2019

CppCon
184K views • 7 years ago
"Tree-sitter - a new parsing system for programming tools" by Max Brunsfeld38:38

"Tree-sitter - a new parsing system for programming tools" by Max Brunsfeld

Strange Loop Conference
63K views • 8 years ago
High-performance Tree Wrangling, the APL Way // Aaron Hsu // Dyalog '1830:37

High-performance Tree Wrangling, the APL Way // Aaron Hsu // Dyalog '18

Dyalog User Meetings
6K views • 7 years ago
Twitter’s Quest for a Wholly Graal Runtime by Chris Thalinger50:11

Twitter’s Quest for a Wholly Graal Runtime by Chris Thalinger

Scala Days Conferences
3K views • 8 years ago
CppCon 2018: G. Nishanov “Nano-coroutines to the Rescue! (Using Coroutines TS, of Course)”1:04:26

CppCon 2018: G. Nishanov “Nano-coroutines to the Rescue! (Using Coroutines TS, of Course)”

CppCon
40K views • 8 years ago