Show HN: JSONPath Benchmark in Java (SJF4J vs. Jayway)
1 points
7 hours ago
| 1 comment
| HN
I ran a JMH benchmark comparing JSONPath performance in Java.

Libraries: - SJF4J - Jayway JsonPath

Workloads: - query on JsonNode - query on Map/List object graphs

Main result: - ~2x faster on typical queries - up to 7x faster on Map/List

One interesting takeaway is that performance differs a lot depending on whether you run on JsonNode vs native object graphs.

Full write-up: https://dev.to/hannyu/sjf4j-vs-jayway-jsonpath-up-to-7x-fast...

hannyu
7 hours ago
[-]
Happy to share more details if anyone is interested.

The biggest gap appears when running JSONPath directly on Map/List instead of JsonNode.

reply