Skip to content

Benchmarks ​

Runtime flexibility, compiled speed — backed by measured results. Explore representative JMH comparisons here, then follow the full reports for workload definitions, absolute latency, allocation, source code, and raw results.

Performance at a Glance ​

Data Binding1.21×vs. direct Jackson 2 · 100KB Users POJO read
GraalVM Native Image1.35×vs. direct Jackson 2 · 100KB Users POJO read
JSONPath Navigation55.31×vs. SJF4J Runtime · direct POJO lookup, 100KB
JSON Schema Validation53.6×vs. SJF4J Runtime · Creek POJO validation
Object Mapping1.31×vs. MapStruct · extended Order, 100KB
JDBC Result Mapping16.03×vs. Spring JDBC · 1,000 POJO rows

Selected, workload-specific speedups, not a cross-category ranking. The comparison baseline is different in each case; see the charts and linked reports for details.

Data Binding on the JVM ​

On the JVM, @CompiledBinder specializes the selected JSON or YAML backend at compile time. The following charts compare 100KB POJO reads on two models: Users (ordinary scalar fields and nested objects) and Clients (typed values including UUIDs, date/time types, decimals, and enums).

Users POJO Read · Direct backend / CompiledBinder · 100KBBaseline / SJF4J · greater than 1× favors SJF4J
Jackson 21.21×
Jackson 31.15×
Fastjson21.07×
Gson1.17×
SnakeYAML1.82×
Clients POJO Read · Direct backend / CompiledBinder · 100KBBaseline / SJF4J · greater than 1× favors SJF4J
Jackson 23.13×
Jackson 33.23×
Fastjson21.04×
Gson2.43×
SnakeYAML1.86×

Compiled Binding stays close to direct backend performance on the simpler Users model, with larger gains on strongly typed Clients for some backends. Results depend on the operation and model: for example, 100KB Users POJO writes on Fastjson2 measure 1.01× against direct binding. SnakeYAML measures YAML rather than JSON; compare implementations within each backend, not JSON against YAML. The full suite also covers Maps, JSON-P, separate reads/writes, and 1/10/100KB inputs.

v1.5.2-SNAPSHOT · Temurin 25 · JMH · November 17, 2026. Ratios compare each backend within its own runner job.

Data Binding Benchmarks

Binding on GraalVM Native Image ​

Compiled binding also runs in GraalVM Native Image AOT executables. The serial Native Image benchmark compares 100KB POJO reads for both Users and Clients against direct third-party library binding.

Users POJO Read · Direct backend / CompiledBinder · Native Image AOT · 100KBBaseline / SJF4J · greater than 1× favors SJF4J
Jackson 21.35×
Jackson 36.37×
Fastjson25.5×
Gson1.15×
Clients POJO Read · Direct backend / CompiledBinder · Native Image AOT · 100KBBaseline / SJF4J · greater than 1× favors SJF4J
Jackson 23.4×
Jackson 38.17×
Fastjson23.37×
Gson2.56×

Native Image uses a different runtime and execution environment from the JVM measurements above. These ratios compare implementations within the same AOT benchmark, not JVM speed against Native Image speed. Map workloads typically show much smaller differences.

v1.5.1-SNAPSHOT · GraalVM Community 25.5.5.0.3 · Native Image -O2 · November 11, 2026. Three serial native processes per case; exploratory hosted-runner results.

GraalVM Native Image Benchmarks

JSONPath Navigation ​

SJF4J executes JSONPath queries directly on Maps, Lists, JsonNodes, and POJOs. For 100KB Map/List inputs, CompiledNavigator is faster than Jayway JsonPath across these five query shapes, with the same pre-parsed input and reusable paths.

Jayway JsonPath / CompiledNavigator · 100KB Map/ListBaseline / SJF4J · greater than 1× favors SJF4J
Direct lookup27.23×
Wildcard9.72×
Filter6.56×
Descendant4.59×
Slice11.9×

On ordinary POJOs, a direct compiled property lookup takes 2.75 ns/op versus 151.83 ns/op for SJF4J Runtime (55.31×). Complex filters have smaller gains. In the measured suite, Runtime beat Jayway in 30/30 comparable Map/JsonNode queries, and Compiled beat Runtime in 45/45 Map/JsonNode/POJO queries.

v1.5.0 · Temurin 25 · JMH · November 11, 2026. Query execution excludes path parsing; the Jayway comparison above is for Map/List inputs, not POJO inputs.

JSONPath Navigation Benchmarks

JSON Schema Validation ​

JSON Schema validation can operate directly on Java objects without first materializing an intermediate JSON tree. The following compares @CompiledValidator against SJF4J Runtime on the same prebuilt Creek fixtures.

SJF4J Runtime / CompiledValidator · validation onlyBaseline / SJF4J · greater than 1× favors SJF4J
POJO53.6×
Map2.31×

For the separate Jackson2 JsonNode workload, SJF4J Runtime is 2.41× faster than NetworkNT. No comparable NetworkNT POJO or compiled JsonNode result was measured, so those cases are not combined into the chart.

In the roundtrip test, CompiledBinder + CompiledValidator completes serialization, deserialization, and validation in 5.888 µs/op, versus 7.024 µs/op for plain Jackson2 serialization and deserialization without validation. These are distinct workloads; the comparison is shown to illustrate the combined compiled path, not to claim equivalent validation work.

v1.5.0 · Temurin 25 · JMH · November 9, 2026 · JSON Schema Draft 2020-12.

JSON Schema Validation Benchmarks

Object Mapping ​

@CompiledMapper is generally close to MapStruct on ordinary POJO mapping and can be faster on nested or collection-heavy workloads. It is not intended to imply an order-of-magnitude speedup over an already compiled mapper.

MapStruct / CompiledMapper · representative object mappingsBaseline / SJF4J · greater than 1× favors SJF4J
Classic Order1.05×
Extended Order · 100KB1.31×
Flat POJO0.98×
ArrayList · 100KB1.45×
LinkedList · 100KB0.93×

The same test suite reports near-identical allocation in most paired workloads. ArrayList benefits more from generated indexed traversal, while LinkedList is a measured case where CompiledMapper is slower. The extended Order workload exercises nested Beans, Maps, JsonObjects, and list conversion.

v1.5.1-SNAPSHOT · Temurin 25 · JMH · November 12, 2026. Mapping excludes JSON binding and JDBC work.

Object Mapping Benchmarks

JDBC Result Mapping ​

@CompiledJdbcMapper generates direct ResultSet-to-object mapping with a prepared, reusable row mapper. On the 12-column Customer Account POJO fixture, its list-mapping path is faster than Spring JDBC's BeanPropertyRowMapper and MyBatis automatic mapping.

Framework / CompiledJdbcMapper · POJO ListBaseline / SJF4J · greater than 1× favors SJF4J
Spring · 1,000 rows16.03×
Spring · 100,000 rows15.92×
MyBatis Auto · 1,000 rows7.34×
MyBatis Auto · 100,000 rows7.37×

The full benchmark also covers 1 and 10 rows, records, Maps, row-by-row mapping, and MyBatis explicit mappings and cursors. At 100,000 rows, Spring Record mapping shows a much larger advantage for SJF4J (110.12×), but that result is specific to DataClassRowMapper on this fixture.

v1.5.1-SNAPSHOT · Temurin 25 · JMH · November 13, 2026. Includes ResultSet traversal and object materialization; excludes SQL execution, connection setup, and network I/O.

JDBC Result Mapping Benchmarks

Independent Benchmarks ​

The main repository is the source of truth for benchmark configuration, complete latency and allocation tables, raw JMH results, and reproducibility notes. The six Benchmarks links above lead directly to those reports.

For additional context, the following are separate third-party comparison and compliance projects, not the sources of the speedup figures on this page:

Released under the MIT License.