ZON
The Zero-Overhead Notation for High-Performance Systems.
The Problem
Data serialization implies a cost. Formats like JSON force CPUs to burn cycles parsing text, allocating strings, and managing garbage, turning every data access into a computation. For high-frequency systems, this latency is unacceptable.
ZON changes the paradigm. It maps files directly to memory. By using pointer-less relative offsets and strict 64-byte alignment, the on-disk format is the in-memory representation. It is cache-line friendly, mmap-ready, and requires zero parsing.
JSON (Traditional):
[Disk] -> [Read String] -> [Parse Text] -> [Allocate Object] -> [Memory] 🐢
ZON (Zero-Overhead):
[Disk] ------------------ (mmap) -------------------------> [Memory] 🚀
The Evidence
Benchmarks comparing ZON against standard JSON deserialization for a composite game entity (Player struct):
| Format | Mean Access Time | Throughput | Speedup |
|---|---|---|---|
| JSON | ~117.43 ns | ~8.5 M ops/s | 1x |
| ZON | ~18.83 ns | ~53.1 M ops/s | 6.2x |
> Benchmark conducted on a strictly aligned composite workload.
Quick Start
Usage
use ;
Philosophy
Data should not be parsed. It should be read.
ZON is built for systems where latency is the primary constraint:
- High-Frequency Trading (HFT)
- Game Engines (Entity Component Systems)
- Large Scale Distributed Systems
By eliminating the transformation layer between disk and memory, we free the CPU to do actual work.
Installation
Add to your Cargo.toml:
[]
= "0.1.0"