Skip to main content
Version: dev

Java Xlang Serialization Benchmarks

See the Java JSON benchmark report for fory-json, Jackson, and Gson results.

This report covers the xlang benchmark groups generated by benchmarks/java/run.sh. It does not inherit the environment or native-mode workloads recorded in the separate Java native report. The checked-in xlang snapshot did not record its host, Fory commit, or dependency versions; rerun the benchmark before using these results for a current comparison.

See Benchmark Methodology for the metadata required by new or refreshed reports.

Workloads

  • NumericStruct: primitive numeric fields.
  • Sample: the model used by the Kryo benchmark suite.
  • MediaContent: the media model from jvm-serializers.
  • *List: a list of the corresponding model.

Run the Benchmark

Run from benchmarks/java/run.sh. Raw JMH JSON stays under the ignored local benchmarks/java/reports/ directory; throughput.png and this xlang report are published under docs/benchmarks/object-serialization/xlang/java/.

cd benchmarks/java
./run.sh

JMH parameters: -f 1 -wi 3 -i 3 -t 1 -w 3s -r 3s -bm thrpt -tu s. Do not skip warmup. Higher throughput is better.

Results

Java Xlang Serialization Throughput

Data typeOperationFory ops/secProtobuf ops/secFlatbuffer ops/secFastest
NumericStructSerialize46,787,64733,024,1619,612,018Fory
NumericStructDeserialize71,683,70729,837,93140,514,436Fory
SampleSerialize17,406,9022,071,9633,153,672Fory
SampleDeserialize17,772,1231,867,9674,179,494Fory
MediaContentSerialize10,783,3251,781,3381,444,737Fory
MediaContentDeserialize7,950,2032,184,5973,453,985Fory
NumericStructListSerialize21,263,6732,511,0813,047,836Fory
NumericStructListDeserialize19,249,8772,067,2048,168,569Fory
SampleListSerialize4,580,165401,280696,268Fory
SampleListDeserialize3,811,985344,945773,625Fory
MediaContentListSerialize1,657,717353,717296,868Fory
MediaContentListDeserialize1,111,043435,956516,192Fory