Skip to main content

Module parse

Module parse 

Source
Available on crate feature worker-batch and (crate features worker-batch or worker-pool or worker) 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-4x faster than serde_json)
  • MsgPack: rmpv native decode -> sonic_rs::Value via a direct value walker (no rmp_serde -> serde_json bridge; 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.