The Undisputed Fastest JSON Library in Existence.
Tachyon v6.0 is a high-performance, single-header C++20 JSON library designed to obliterate existing benchmarks. Engineered with heavy AVX2 assembly optimizations and a novel "Dual-Engine" architecture, Tachyon achieves parsing speeds exceeding 4500 MB/s on standard hardware, outperforming simdjson by ~2.4x and nlohmann::json by ~200x.
Benchmarks were conducted on an Intel Xeon (Haswell) environment with CPU Pinning, 64-byte Alignment, and Statistical Rigor (Median of 1000 iterations).
| Dataset | Library | Throughput (MB/s) | Median Latency | P99 Latency | Stdev |
|---|---|---|---|---|---|
| Large Array (25MB) | Tachyon v6.0 | 4,577 MB/s | 5.46 ms | 6.89 ms | 9.2% |
| Simdjson (OnDemand) | 1,886 MB/s | 13.25 ms | 13.67 ms | 0.9% | |
| Glaze (Generic) | 139 MB/s | 179.05 ms | 185.72 ms | 1.1% | |
| Nlohmann JSON | 25 MB/s | 1013 ms | 1015 ms | 0.3% | |
| Canada.json (Floats) | Tachyon v6.0 | 5,585 MB/s | 0.38 ms | 0.46 ms | 5.2% |
| Simdjson | 3,541 MB/s | 0.61 ms | 0.69 ms | 4.6% | |
| Glaze | 372 MB/s | 5.76 ms | 5.97 ms | 1.1% | |
| Nlohmann | 31 MB/s | 69.3 ms | 70.1 ms | 0.5% |
Note: Tachyon outperforms Simdjson by ~2.4x on Large Arrays. Glaze generic parsing is significantly slower than typed parsing (which requires schemas).
MB/s
5000 | [TACHYON] 4577
4500 | |||||||||||||||||||||||||||||
4000 | |||||||||||||||||||||||||||||
3500 | |||||||||||||||||||||||||||||
3000 | |||||||||||||||||||||||||||||
2500 | |||||||||||||||||||||||||||||
2000 | ||||||||||||| [Simdjson] 1886
1500 | |||||||||||||
1000 | ||||||
500 | ||
0 | [Glaze] 139 [Nlohmann] 25
At the heart of Tachyon lies a handcrafted AVX2 structural indexer. Unlike traditional state machines, Tachyon uses a 2-pass SIMD approach:
-
Classification Pass:
- Loads 32 bytes into YMM registers.
- Uses a highly optimized PSHUFB (Packed Shuffle Bytes) lookup table to classify characters into
Quote,Backslash, andStructural(Commas, Colons, Brackets) in a single step.
-
Bitmask Generation:
_mm256_movemask_epi8extracts significant bits to form a 32-bit structural mask.- A Branchless State Machine manages string parsing (handling escaped quotes) using
PCLMUL-style XOR prefix sums.
-
Lazy Indexing (Zero-Copy):
- The parser produces a "Bitmask Index" rather than a full DOM tree.
- Data is accessed via a
Cursorthat navigates this bitmask. - No memory is allocated for JSON nodes until you ask for them (Lazy Materialization).
- Lazy View:
json::parse_view(ptr, len)creates a read-only view over the buffer. Accessingj["key"]scans the bitmask at lightning speed (Zero-Copy). - Materialized DOM: Accessing
j["key"]on a mutable object automatically promotes the view to a standardstd::map/std::vectorrepresentation (Owned), ensuring ease of use for modification.
- JSON (RFC 8259)
- JSONC (Comments
//and/* */) - Binary Placeholders: API stubs for CBOR, MessagePack (throws
runtime_errorcurrently).
- Zero-Boilerplate Reflection:
struct User { std::string name; int age; }; TACHYON_DEFINE_TYPE_NON_INTRUSIVE(User, name, age) // Auto-Serialization User u = j.get<User>(); json j2 = u;
- Type Safety: strict checks for types,
std::variantbackend. - STL Compatibility: Works with
std::string,std::vector,std::map.
TACHYON PROPRIETARY SOURCE LICENSE v1.0
Copyright (c) 2026 (BosyjJakub). All Rights Reserved.
- No Redistribution: This source code may not be distributed, sub-licensed, or shared without explicit permission.
- No Modification: Modification of the core ASM/SIMD algorithms is strictly prohibited to maintain performance integrity.
- No Theft: Extraction of ASM kernels or "Look-Up Table" logic for use in other libraries is forbidden.
THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.