JSON Benchmark
The JSON benchmark evaluates the performance of structured data processing using complete serialization and deserialization workloads.
JSON remains one of the most widely used data interchange formats in modern software systems. Nearly every backend service, REST API, message broker, monitoring platform, and configuration system relies on JSON as a primary serialization format.
Unlike synthetic benchmarks that measure parser speed using isolated loops, the Scalionix JSON benchmark measures complete application workflows including object creation, serialization, deserialization, validation, memory allocation, filesystem interaction, and end-to-end processing.
The benchmark therefore represents realistic software workloads rather than isolated library performance.
Objectives
The JSON benchmark has four primary objectives.
- Measure serialization throughput.
- Measure deserialization throughput.
- Measure complete JSON processing pipelines.
- Measure filesystem interaction when processing JSON documents.
These workloads represent some of the most common operations executed by backend applications, microservices, API gateways, monitoring systems, and distributed services.
Why JSON?
JSON was selected because it remains the dominant structured data format used by modern software.
Typical production workloads include:
- REST APIs
- Configuration files
- Monitoring data
- Telemetry
- Logging
- Event processing
- Message queues
- Service discovery
Most software systems spend a significant amount of CPU time converting in-memory structures into JSON and reconstructing them back into native objects.
Measuring these workloads therefore provides a meaningful representation of practical application performance.
Benchmark Philosophy
The benchmark intentionally avoids measuring parser microbenchmarks.
Instead, every scenario executes complete application logic.
Typical benchmark execution consists of:
Object generation
│
▼
Serialization
│
▼
Optional filesystem write
│
▼
Optional filesystem read
│
▼
Deserialization
│
▼
Object verification
│
▼
Performance measurement
The benchmark therefore measures the complete cost of structured data processing rather than individual library functions.
Benchmark Scenarios
The JSON benchmark currently consists of six independent scenarios.
JSON Serialization (Memory)
Measures serialization of generated objects directly into memory buffers.
Scenario
json.serialize.memory
JSON Serialization (File)
Measures serialization followed by writing JSON documents to persistent storage.
Scenario
json.serialize.file
JSON Deserialization (Memory)
Measures reconstruction of objects from in-memory JSON documents.
Scenario
json.deserialize.memory
JSON Deserialization (File)
Measures complete filesystem read followed by object reconstruction.
Scenario
json.deserialize.file
JSON Round Trip (Memory)
Measures complete in-memory processing.
Pipeline
Generate objects
│
▼
Serialize
│
▼
Deserialize
│
▼
Verify
Scenario
json.round_trip.memory
JSON Round Trip (File)
Measures complete persistent storage workflow.
Pipeline
Generate objects
│
▼
Serialize
│
▼
Write file
│
▼
Read file
│
▼
Deserialize
│
▼
Verify
Scenario
json.round_trip.file
Dataset Generation
Every benchmark dataset is generated deterministically.
The benchmark does not rely on static JSON files.
Instead, object graphs are generated programmatically before benchmark execution.
Dataset generation ensures:
- Identical benchmark input
- Deterministic execution
- Reproducible reports
- Platform independence
Generated datasets include nested objects, arrays, strings, numeric values, boolean values, and realistic field distributions representative of production APIs.
Dataset Sizes
The benchmark evaluates multiple dataset sizes.
Larger datasets exercise memory bandwidth and cache hierarchy.
Smaller datasets emphasize parser overhead and allocation efficiency.
Every dataset size represents the amount of serialized JSON data processed by the benchmark.
Dataset sizes remain deterministic across every supported platform.
Object Counts
In addition to total dataset size, workloads vary the number of serialized objects.
Changing the object count modifies several characteristics simultaneously.
- Allocation frequency
- Parser complexity
- Container growth
- Object traversal
- Memory locality
This allows the benchmark to evaluate parser efficiency under different object graph densities.
Worker Configuration
The JSON benchmark evaluates scalability using multiple worker configurations.
Representative worker counts include:
[ 1 / 2 / 4 / 6 / 8 / 12 / 16 / 20 / 24 / 32 ]
The exact worker matrix depends on the detected hardware configuration.
Each worker processes an independent dataset.
No synchronization is required between workers.
This allows the benchmark to evaluate pure scalability of structured data processing.
Verification
Every JSON benchmark performs strict correctness verification.
Verification includes:
- Successful serialization
- Successful parsing
- Object reconstruction
- Structural validation
- Equality verification
Benchmark results are accepted only when reconstructed objects match the original generated dataset.
Serialization failures immediately invalidate benchmark execution.
Measured Metrics
The benchmark records multiple execution metrics.
Primary metrics include:
- Execution duration
- Bytes processed
- Throughput
- Worker configuration
- Iteration timing
The scoring adapter converts these measurements into normalized throughput expressed as bytes processed per second.
Score Calculation
JSON workloads participate fully in the compute scoring model.
Every workload contributes:
Single-thread Score
Measures processor efficiency using one execution worker.
Multi-thread Score
Measures maximum throughput achieved across worker configurations.
Scaling Score
Measures parallel scalability relative to the single-thread execution.
The final workload score is calculated using the weighted scoring model described later in this documentation.
Scenario scores are aggregated into the JSON category score.
Practical Interpretation
High JSON scores typically indicate:
- Efficient CPU architecture
- Strong branch prediction
- High memory bandwidth
- Efficient cache hierarchy
- Optimized allocator behavior
Because JSON processing is memory intensive rather than purely computational, benchmark results often reflect both processor performance and memory subsystem efficiency.
For this reason, the JSON benchmark represents one of the best indicators of real-world backend application performance.
Design Summary
The JSON benchmark represents complete structured data processing rather than isolated parser performance.
By combining deterministic datasets, multiple execution scenarios, filesystem interaction, verification, and scalable worker configurations, the benchmark provides a realistic evaluation of one of the most common workloads executed by modern software systems.
Unlike synthetic parser benchmarks, the resulting score reflects the practical efficiency of the entire JSON processing pipeline and therefore serves as a reliable indicator of structured data processing performance in production environments.