Skip to content

Dhi13man/jsonata4java-benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsonata4java-benchmark

Minimal Benchmarking of IBM JSONata4Java vs doing the same work in native Java.

This benchmark is implemented using Java Microbenchmark Harness (JMH)

Latest Run (2023-12-15T20:00:00Z IST) Results

img.png

Test ran

The aim was to calculate the average operation time and throughput.

  • Ran three types of transformations (SIMPLE / COMPLEX / JOIN)
  • Ran using 3 JVM Warmup Process and 5 Evaluated JVM Processes
  • Each process runs 5 Warmup iterations and 5 Evaluated iterations
  • Each iteration runs as many operations as possible for 10 seconds

Total Benchmarking Duration: 4 Hours 08 Minutes 39 Seconds

Key Findings

As per the benchmarking results,

  1. logic implemented natively in Java is between 2 and 3 orders of magnitude faster than the same logic implemented in JSONata.
  2. JSONata precompiled implementation is up to 1 order of magnitude faster than the compiled-at-runtime JSONata implementation.
  3. JSONata's implementation code is much more repeatable and flexible than the native implementation.

Summary

Despite JSONata seeming much slower than native implementation, most systems are not going to be doing this order of magnitude of processing anyway. So, the JSONata implementation is a good choice for most systems, because of its flexibility.

Further, pre-compiling the JSONata expressions in Java could lead to performance improvements, even if not as much as native implementation.

About

Minimal Benchmarking using Java Microbenchmark Harness (JMH), of IBM JSONata4Java vs doing the same work in native java.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages