Skip to content

Parsing JSON at Gigabytes per Second with simdjson

Photo of Richard Thomson
Hosted By
Richard T.
Parsing JSON at Gigabytes per Second with simdjson

Details

Parsing JSON inputs is a common task in network oriented services. Many web APIs provide data as JSON outputs that are fed into another process. Parsing and validating JSON text inputs can be a significant bottleneck for a high throughput network service.

This month, Richard Thomson will give us an overview of the simdjson library for parsing JSON inputs. From a feature perspective, this library gives us fast parsing and validation of JSON input documents and provides an API for traversing the parsed document.

What's more interesting about this library is the approach taken by the implementation: using SIMD CPU instruction set extensions for parsing and validating the JSON inputs. This involves a two-pass algorithm for scanning the input text for interesting characters and a second pass that builds a document structure and uses SIMD instructions for number parsing and UTF-8 string validation. The library also uses a dynamic dispatch mechanism to allow a single build of the library to select the appropriate set of SIMD instructions at runtime.

The presentation will cover the following topics:

  • A brief overview of SIMD instruction set extensions
  • How to extract data from the parsed document structure?
  • What does parsing look like with SIMD instructions?
  • How does the implementation use dynamic dispatch for instruction set selection at runtime?
  • How does the implementation expose SIMD operations?

This will be an online meeting, so drinks and snacks are on you!

Join the meeting here: https://meet.xmission.com/Utah-Cpp-Programmers

Watch previous topics on the Utah C++ Programmers YouTube channel:
https://www.youtube.com/@UtahCppProgrammers

Future topics: https://utahcpp.wordpress.com/future-meeting-topics/
Past topics: https://utahcpp.wordpress.com/past-meeting-topics/

Photo of Utah C++ Programmers group
Utah C++ Programmers
See more events

Every 2nd Wednesday of the month

Online event
Link visible for attendees
FREE