Boost logo

Boost :

From: Julien Blanc (julien.blanc_at_[hidden])
Date: 2019-10-23 06:23:07


Le mardi 22 octobre 2019 à 18:12 -0700, Vinnie Falco a écrit :
> On Tue, Sep 24, 2019 at 4:29 AM Julien Blanc via Boost
> <boost_at_[hidden]> wrote:
> > You may have a look at
> > https://github.com/Julien-Blanc-tgcm/jbc-json .
>
> Do I understand this correctly, that jbc-json parses one character at
> a time and stores function pointers in the stack, calling through the
> function pointer for each character?

You understand correctly. IIRC i measured at the time i decided to go
this way that it was not slower than the traditional switch / case
statement.

When i started this library i put safety requirements over speed. This
is why in the first versions, there weren't even external api to parse
more than one character at a time (a strong guarantee against buffer
overflows). This has improved to allow for in-situ parsing, since
memory use has been an important goal for me.

There’s still plenty of room for improvements, however (for example,
the default structure proposed to store parsed object is particularly
inefficient and does not support allocators).

Regards,

Julien


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk