Parsing Streams of JSON Documents at Over a Hundred Gigabytes per Second on CPUs
Large volumes of data are shipped as streams of JSON documents, one per line, and ingesting them is often a bottleneck for analytics. We present a parallel parser for such streams: workers claim byte ranges from one atomic counter and snap them to delimiters that cannot occur inside a value, so a document is never split and no lock is taken on the hot path. Because the parser is on-demand, itmaterializes only the fields a query names, which fuses query evaluation into the parse. We evaluate the design on five Intel and AMD servers against Pison, a state-of-the-art structural-index parser, and against the tree-building parsers in common use, verifying identical results throughout. With dynamic assignment the best rate per machine ranges from 105 GiB/s to 229 GiB/s (up to 246 GiB/s with static assignment), several times the throughput that graphics processing unit (GPU) parsers report on the same datasets. Against Pison we are 4.3 to 17.0 times faster end to end, because its index requires a padded copy that its published timings exclude. Against yyjson, the fastest tree-building parser, we retire fewer instructions per byte on every dataset. We also compare with three data systems—Apache Arrow, DuckDB and Polars—and with cuJSON on its own end-to-end workload. Our parser and benchmark are open source.
Authors
- Daniel Lemire A (ORCID: https://orcid.org/0000-0003-3306-6922)
- Jaël Champagne Gareau
Institutions
- Université TÉLUQ (CA)
Publication Details
- Journal
- Research Square
- Published
- 2026-11-23
- DOI
- https://doi.org/10.21203/rs.3.rs-11731671/v1
- Primary Topic
- Advanced Database Systems and Queries
- Type
- preprint
Funders
- Natural Sciences and Engineering Research Council of Canada