Zimdjson: Parsing gigabytes of JSON per second. Zig port of simdjson with fundamental features

I would say this is my first serious systems-related project, as I’ve worked professionally as a frontend developer, funnily saying. It was a personal challenge that took me a year and a half, which could have taken twice the time if I hadn’t choose Zig, so I want to thank Andrew and the core team for this language, as it is a very educative tool.

The zimdjson library is a port of simdjson, a high-performance JSON parser that uses SIMD instructions, with additional features that I consider a must-have.

  • Streaming support which can handle arbitrarily large documents with O(1) of memory usage.
  • An ergonomic, Serde-like deserialization interface thanks to Zig’s compile-time reflection.
  • More efficient memory usage.

I won’t keep copy-pasting, so here it is the repository with examples, benchmarks and documentation.

There is always room for improvement, so any feedback is welcome!

14 Likes

Looks great, and including the benchmark scripts is very nice!

Have you checked how performance stacks up against simdjzon ?

1 Like

Woah that’s really cool, welcome to ziggit. :slight_smile:

1 Like