velox-io/json (vjson) is a recently released high-performance Go JSON library that claims impressive benchmark results (~7x faster unmarshal, ~4x faster marshal compared to encoding/json). They already include sonic in their benchmark suite. It would be interesting to add vjson to sonic's benchmark comparisons.
Basic idea of velox-io/json
vjson takes a different approach from sonic — it does not use SIMD or JIT. Instead:
- Decoder (Unmarshal): Pure-Go implementation using a single-pass decoder with zero-copy strings, avoiding extra allocations by not copying string data when possible.
- Encoder (Marshal): Uses a native C "JSON VM" backend (
native/encvm) — a small virtual machine written in C that handles the hot encoding path. Pre-built native artifacts are shipped as .syso files, so CGo is not required at build time. A pure-Go fallback exists for unsupported platforms.
This is an interesting contrast to sonic's JIT + SIMD approach and could provide useful data points for the community.
Suggested action
Add velox-io/json to the existing benchmark suite (alongside JsonIter, GoJson, StdLib, etc.) so users can see how the two libraries compare under the same test conditions.
velox-io/json (vjson) is a recently released high-performance Go JSON library that claims impressive benchmark results (~7x faster unmarshal, ~4x faster marshal compared to
encoding/json). They already include sonic in their benchmark suite. It would be interesting to add vjson to sonic's benchmark comparisons.Basic idea of velox-io/json
vjson takes a different approach from sonic — it does not use SIMD or JIT. Instead:
native/encvm) — a small virtual machine written in C that handles the hot encoding path. Pre-built native artifacts are shipped as.sysofiles, so CGo is not required at build time. A pure-Go fallback exists for unsupported platforms.This is an interesting contrast to sonic's JIT + SIMD approach and could provide useful data points for the community.
Suggested action
Add
velox-io/jsonto the existing benchmark suite (alongside JsonIter, GoJson, StdLib, etc.) so users can see how the two libraries compare under the same test conditions.