3 ms·
Show HN: JSONPath Benchmark in Java (SJF4J vs. Jayway)
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-faster-in-java-benchmarks-2aof https://dev.to/hannyu/sjf4j-vs-jayway-jsonpath-up-to-7x-fast...
- hannyu 6mo agoHappy to share more details if anyone is interested. The biggest gap appears when running JSONPath directly on Map/List instead of JsonNode.