Skip to main content

Module parse

Module parse 

Source
Available on (crate features worker-pool or worker-batch or worker) and crate feature worker-batch only.
Expand description

Parse phase: convert raw bytes into a sonic_rs::Value using SIMD acceleration. This is the most CPU-intensive phase (~1-5 µs per message).

  • JSON: sonic_rs::from_slice (AVX2/NEON SIMD, 2-4× faster than serde_json)
  • MsgPack: rmp_serdeserde_json::Value → JSON bytes → sonic_rs::Value (slower, but MsgPack messages are a small minority in practice)
  • Auto: byte-sniff via PayloadFormat::detect, then dispatch

Enums§

ParseError
Error produced when a single message fails to parse.

Functions§

parse_payload
Parse raw bytes into a sonic_rs::Value using SIMD acceleration.