Skip to content

Commit

Permalink
Fix Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhi13man committed Dec 11, 2023
1 parent 163b7db commit f8113c4
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,19 @@ using [Java Microbenchmark Harness (JMH)](https://github.com/openjdk/jmh)

[![img.png](assets/2023-12-11T20:00:49Z.png)](https://github.com/Dhi13man/jsonata4java-benchmark/blob/218dd4403842fecb80a0713c1a80c83396089eb9/reports/2023-12-11T20%3A00%3A49Z/native_vs_jsonata_vs_jsonata_precompiled.txt)

As per the benchmarking results, the native implementation is between 2 and 3 orders of magnitude
faster than the Jsonata implementation. The Jsonata precompiled implementation is between 1 and 2
orders of magnitude faster than the Jsonata implementation.
### Key Findings

However, the Jsonata implementation is much more readable and maintainable than the native
implementation and 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 for its flexibility.
As per the benchmarking results,

1. logic implemented natively in Java is between 2 and 3 orders of magnitude faster than
the same logic being implemented in Jsonata.
2. The Jsonata precompiled implementation is up to 1 order of magnitude faster than the
compiled-at-runtime Jsonata implementation.
3. The Jsonata 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.

0 comments on commit f8113c4

Please sign in to comment.