Intel AVX-512 A Big Win For... JSON Parsing Performance

Written by Michael Larabel in Software on 26 May 2022 at 07:00 AM EDT. Page 1 of 2. 76 Comments.

In addition to the many HPC workloads and other scientific computing tasks where Intel's AVX-512 performance on their latest processor proves very beneficial, it also turns out AVX-512 can provide significant benefit to a much more mundane web server task: JSON parsing. The simdjson project that is focused on "parsing gigabytes of JSON per second" this week issued simdjson 2.0 and is headlined by an Intel-led contribution of AVX-512 support.

The JavaScript Object Notation (JSON) data interchange format is heavily used by practically all major websites/web-applications in some capacity and can be dealt with by pretty much all programming languages. JSON really need not any introduction. The past few years there has been simdjson as an open-source (Apache 2.0 licensed) project aimed at delivering the highest performance JSON parser that can parse "gigabytes of JSON per second" and claims of being 4~25x faster than alternatives.


simdjson 2.0 adds AVX-512 support, contributed by Intel.

The simdjson library has already supported SSSE3 and AVX2 code paths that are automatically used on supported CPUs as well as other SIMD vector instructions on POWER or Arm NEON. But recently Intel engineers cooperating with simdjson developers contributed AVX-512 support to simdjson.

Going from 256-bit to 512-bit SIMD really pays off for JSON parsing performance. This is "basic" AVX-512 usage so far and can be further improved upon moving forward but the results from the original pull request show already the significant benefits possible. This AVX-512 implementation is used automatically when running on Xeon Scalable "Ice Lake" or newer or Tiger Lake on the client side. Older AVX-512 capable CPUs aren't using the AVX-512 kernel by default due to the risk of down-clocking that could hurt the performance.

This AVX-512 enablement work culminated with the release of simdjson 2.0.0 yesterday. The simdjson 2.0 announcement talks up a performance boost of 25~40% via the new AVX-512 code path. Of course, I was eager to test it out myself and ran some simdjson benchmarks against the 1.0 state without AVX-512.


Related Articles