Back to all posts
PERFORMANCE & COMPILERS • 10 MIN READ • November 2, 2024

SIMD JSON Parsing at 4GB/s in Rust with portable_simd on x86-64 and ARM

Parsing 100,000 JSON payloads per second per core by utilizing vector registers to identify structural characters in parallel.

Prabhat Sharma Principal Systems Architect

Find the Structure First

The insight behind every fast JSON parser is to locate structural characters — braces, brackets, colons, quotes — in a single vectorized pass before you ever interpret a value. std::simd (portable_simd) lets one loop compile to AVX2 on x86-64 and NEON on ARM from the same source.

One Source, Two Architectures

By writing against Simd<u8, 32> instead of raw intrinsics, the parser stayed readable and still hit 4GB/s on Graviton and x86 alike — no duplicated unsafe intrinsic paths to keep in sync.