Fork me on GitHub
#ring-swagger
<
2019-03-29
>
borkdude05:03:31

Have there been any benchmarks between jsonista and transit?

ikitommi06:03:40

@borkdude no, there is not. What kind of tests you would like to see? Maybe all of encoding, decoding & encoding+decoding on the JVM? Current perf tests are here: https://github.com/metosin/jsonista/blob/master/test/jsonista/json_perf_test.clj

ikitommi06:03:41

btw, now looking at the perf numbers, I think the spec+jsonista combo would enable some good optimizations on perf on decode. As we would know the form of the maps, we could precreate the (Immutable) maps before decode. Setting a value for a known key in pers.array-map is Much faster than adding a key.

ikitommi06:03:55

My quess is that it would be 2x faster (based on similar optimizations in reitit wildcard param handling)

😲 4
metametadata15:03:55

I've recently evaluated different ways of writing/readinig clojure data and (unless I benchmarked something incorrectly) Jsonista turned out to be the fastest so I went with it.