Performance of std.json
Johannes Pfau via Digitalmars-d
digitalmars-d at puremagic.com
Tue Jun 3 00:15:14 PDT 2014
Am Mon, 02 Jun 2014 19:13:07 +0000
schrieb "Sean Kelly" <sean at invisibleduck.org>:
> I've said this a bunch of times, but what I want to see is a
> SAX-style parser as the bottom layer with an optional DOM-style
> parser built on top of it.
I'd probably prefer a tokenizer/lexer as the lowest layer, then SAX and
DOM implemented using the tokenizer. This way we can provide a kind of
input range. I actually used Brian Schotts std.lexer proposal to build a
simple JSON tokenizer/lexer and it worked quite well. But I don't
think std.lexer is zero-allocation yet so that's an important drawback.
More information about the Digitalmars-d
mailing list