[Smtk-developers] JSON in SMTK

Ben Boeckel ben.boeckel at kitware.com
Tue Sep 12 11:37:32 EDT 2017


On Tue, Sep 12, 2017 at 10:38:44 -0400, Ben Boeckel wrote:
> > + it is slow -- see
> > https://github.com/miloyip/nativejson-benchmark#parsing-time where
> > cJSON takes 25ms and jsoncpp takes 166ms; nlohmann takes 71 ms which
> > is not great but look at how easy it is to use; and
> 
> Those results are from 2015 which I'll considere "out of date" to say the
> least. I'm running it again today. Even so, is performance that much of an
> issue? I'm more worried about the maintenance side. If it isn't jsoncpp,
> someone else needs to do the mangling and preparation of the library for
> inclusion.

I have new benchmarks. And the benchmarks are by no means comprehensive,
but looking at details, it makes it obvious where some deficiencies in
jsoncpp is (compared to rapidjson at least). And FWIW, cJSON and
nlohmann have the same weak point.

I would be hesitant to base any conclusions on the benchmark solely. It
tests a grand total of 3 files for performance and I suspect the "hard"
one is really there just to showcase rapidjson rather than be an actual
test case…

The conformance tests are of interest though (and I doubt the
comprehensiveness of the corpus there as well).

More at 1 :) .

--Ben


More information about the Smtk-developers mailing list