tree: e2f6d505e9c28a87d9cf550b1c9ffb56b744bed8
  1. README.md
  2. string_throughput.png
  3. utf8_bytes_throughput.png
docs/benchmarks/java/json/README.md

Java JSON Benchmark Report

The benchmark compares fory-json, Jackson, and Gson using the same data. The String group excludes UTF-8 conversion. The UTF-8 bytes group uses direct byte-array APIs when available. Gson includes String-to-UTF-8 encoding and UTF-8-to-String decoding.

cd benchmarks/java
./run_json.sh --libs fory-json,jackson,gson
  • Benchmark date: 2026-07-28
  • Source commit: bd0ca9825b3206b1a53bf27bfb180a551ab39236
  • Platform: Apple M4 Pro, macOS 15.7.2, arm64
  • JDK: 26.0.1
  • VM: OpenJDK 64-Bit Server VM
  • JMH: 1.37
  • Warmup: 3 iterations × 2 s
  • Measurement: 5 iterations × 2 s
  • Forks: 1; threads: 1
  • Mode: throughput; higher is better

String

Java JSON String benchmark throughput

UTF-8 Bytes

Java JSON UTF-8 bytes benchmark throughput

Results

RepresentationOperationfory-json ops/secjackson ops/secgson ops/secFastest
StringSerialize7,387,4652,049,3681,084,042fory-json
StringDeserialize2,897,9551,074,885902,772fory-json
UTF-8 bytesSerialize10,375,4981,868,6141,037,211fory-json
UTF-8 bytesDeserialize3,077,1581,268,397933,079fory-json