Release v2.0.0: Go Modules v2 & Extreme Performance 🚀
This major release upgrades the library to module path v2 and introduces significant performance optimizations and new features for high-performance systems.
⚡ What's New
- Go Modules v2: Updated the module path to
github.com/GenshIv/silentjson/v2to comply with Go semantic versioning standards. - Shared Memory (SHM) Integration: Added support for parsing JSON directly from Shared Memory (via
mmap) with zero heap allocations. Perfect for ultra-low latency Inter-Process Communication (IPC). - Zero-Allocation Marshaling: Introduced
MarshalSliceandMarshalfunctions with buffer reuse support. Now JSON generation is as efficient as parsing. - Scalar Parser Optimization: Deep refactoring of the Pure Go (scalar) parser. Performance increased to 829 MB/s, outperforming JIT-based parsers like Sonic even on hardware without AVX2 support.
- Improved ARM64 Support: Stabilized performance and fallbacks for Apple Silicon and ARM-based servers.
📊 Benchmarks (Ryzen 9 7950X3D)
| Library | Mode | Throughput | Memory Allocs |
|---|---|---|---|
| SilentJSON v2 | AVX2 (Parallel) | 24,670 MB/s 👑 | 27 |
| SilentJSON v2 | Scalar (Pure Go) | 810 MB/s | 29 |
| Sonic | AVX2 (JIT) | 644 MB/s | 10,002 |
Standard (encoding/json) |
Pure Go | 110 MB/s | 509,997 |
⚠️ Migration Guide
To upgrade to v2.0.0, update your import paths:
import "github.com/GenshIv/silentjson/v2"And run:
go get github.com/GenshIv/silentjson/v2Full list of changes is available in CHANGELOG.md.