|
Boost : |
From: Zach Laine (whatwasthataddress_at_[hidden])
Date: 2023-12-29 19:13:17
On Fri, Dec 29, 2023 at 11:49â¯AM Vinnie Falco via Boost
<boost_at_[hidden]> wrote:
>
> On Fri, Dec 29, 2023 at 9:29â¯AM Christian Mazakas via Boost <
> boost_at_[hidden]> wrote:
>
> > Also, it'd be good to get some benchmarks going, showcasing the JSON
> > parsing from this library compared to Boost.JSON's benchmark suite.
> >
>
> A naive implementation of the benchmark will be grossly unfair to
> Boost.Parser.
>
> To do this correctly it would require that the Boost.Parser implementation
> use the same containers as Boost.JSON, as they are optimized for
> JSON-specific workloads. And it would require the implementation to use the
> explicit internal stack model adopted by Boost.JSON (copied from RapidJSON).
>
> That is a non-trivial amount of work for which the value proposition is
> unclear; Boost.Parser is designed to work with generic containers while
> Boost.JSON's parser is tuned to work with the json::value container that
> comes with the library.
>
> Of course, if someone else wants to do the work to perform such a
> comparison, I certainly wouldn't discourage them :)
I agree completely. I think you will find that Boost.Parser is pretty
fast. However, it's a general-purpose parsing lib, and so it is never
going to catch up to a bespoke parser like Boost.JSON's. Any lovingly
hand-craften parser is almost certain to beat a very general parser
combinator lib.
Zach
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk