Skip to content

Repository files navigation

singleton-support-benchmark

This is a benchmark to measure the performance degradation of SingletonSupport in jackson-module-kotlin.
The purpose is to see if it is acceptable to enable this option by default in Jackson 3.0.

Benchmark is ./gradlew jmh. See build.gradle.kts for configuration etc.

The results stored in reports were obtained in the following environment

  • Windows 11
  • Ryzen 7 3700X
  • F4-3600C16D-32GTZN

Benchmark details

Compare deserialization throughput on data class with 5 Prop as properties.

The Prop type is a sealed interface with one property.
It is inherited by Cls(data class) and Obj(data object).

The benchmark compares the cases using only Cls or Obj.

Comparison of results

In the Cls case, the throughput remained above 99% compared to when disabled.
Although not a meaningful comparison, the throughput remained above 99% for Obj as well.

Raw results

Below are the raw benchmark result.
They are also stored in ./reports in CSV format.

Benchmark                 Mode  Cnt       Score       Error  Units
E_5P.cls_withSupport     thrpt    4  171935.513 ± 43377.433  ops/s
E_5P.cls_wituoutSupport  thrpt    4  173301.590 ± 29211.467  ops/s
E_5P.obj_withSupport     thrpt    4  328298.414 ± 14034.100  ops/s
E_5P.obj_withoutSupport  thrpt    4  328445.071 ±  9240.661  ops/s

Contributors

Languages