Software Unscripted · Richard Feldman

Making Parsing I/O Bound with Daniel Lemire

·1 hr 18 min·5 clips
Daniel Lemire reveals how SIMD JSON makes parsing so fast that I/O becomes the bottleneck.
This episode of Software Unscripted features host Richard Feldman in conversation with Daniel Lemire, a professor at the University of Quebec and a co-author of the SIMD JSON parser. They explore the challenge of making data parsing so efficient that input/output operations become the primary performance bottleneck. The discussion extends beyond JSON to include parsing techniques for DNS zones, date-time strings, and URLs. Lemire explains that the initial motivation for SIMD JSON stemmed from online debates about optimal data exchange formats, which progressed from XML to JSON and then to binary formats like Protocol Buffers. He describes the parser's core innovation as using Single Instruction, Multiple Data (SIMD) instructions to process multiple characters simultaneously, diverging from traditional architectural approaches. The conversation covers the parser's ability to validate UTF-8 encoding at high speed as an integral part of its operation. Feldman notes his initial impression that the method resembled a collection of performance tricks for math rather than a conventional parser design. They address the common assumption that I/O is always the limiting factor, arguing that CPU-bound parsing is frequently the real constraint in practice. Lemire details applying similar SIMD techniques to accelerate the parsing of DNS zone files. The episode also examines the performance characteristics of Node.js string representations. A key insight is that achieving I/O-bound parsing is a significant accomplishment, as it is less common than often assumed. Lemire contends that binary formats are not inherently superior to well-optimized text formats like JSON for many use cases. The SIMD approach allows the parser to validate structural elements like brackets and braces concurrently with scanning the content. He emphasizes the importance of real-world benchmarking over theoretical, textbook approaches to performance. Feldman expresses surprise at the possibility of parsing textual data at speeds previously considered unattainable. Lemire reveals that the project began as an intellectual challenge to prove the high-performance potential of text-based formats. The tone is highly technical and educational, grounded in a deep exploration of computer science concepts. The style is conversational, with the host engaging the guest on specific implementation details and broader philosophical points. This episode is ideal for software engineers and performance enthusiasts interested in low-level optimization, parsing algorithms, and systems programming. Listeners seeking non-technical content or introductory programming topics might find the discussion too specialized.
Listen to the show on