tree: 7b57c65ab0d1de8be667bfb92ee3cb48645efe49
  1. benchmark_results.json
  2. README.md
  3. string_throughput.png
  4. utf8_bytes_throughput.png
docs/benchmarks/json/scala/README.md

Scala JSON Benchmark Report

The benchmark compares fory-json-scala, jsoniter-scala, and Jackson Scala on the same immutable Scala MediaContent model and Eishay JSON document. The String group excludes UTF-8 conversion; every library in the UTF-8 group uses its direct byte-array API.

  • Benchmark date: 2026-08-14
  • Source commit: 588ad6ab355c4c23fa0a2e4f269a8c733cba7b01
  • Platform: macOS-15.7.2-arm64-arm-64bit (arm64)
  • JDK: 26.0.1
  • VM: OpenJDK 64-Bit Server VM
  • JMH: 1.37
  • Warmup: 2 iterations × 1 s
  • Measurement: 2 iterations × 1 s
  • Forks: 1; threads: 1
  • Aggregation: median of 3 alternating short runs; error bars show the maximum cross-run deviation
  • Mode: throughput; higher is better

String

Scala JSON String benchmark throughput

UTF-8 Bytes

Scala JSON UTF-8 bytes benchmark throughput

Results

RepresentationOperationfory-json-scala ops/secjsoniter-scala ops/secJackson Scala ops/secFastest
StringSerialize6,760,5882,748,9971,955,855fory-json-scala
StringDeserialize3,771,2802,350,297960,362fory-json-scala
UTF-8 bytesSerialize9,485,1222,745,5671,761,719fory-json-scala
UTF-8 bytesDeserialize3,318,8932,391,9231,080,453fory-json-scala

Fory performance advantage

RepresentationOperationvs jsoniter-scalavs Jackson Scala
StringSerialize145.9%245.7%
StringDeserialize60.5%292.7%
UTF-8 bytesSerialize245.5%438.4%
UTF-8 bytesDeserialize38.8%207.2%