[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: I created a faster JSON parser
From: |
Mattias Engdegård |
Subject: |
Re: I created a faster JSON parser |
Date: |
Mon, 11 Mar 2024 15:05:13 +0100 |
11 mars 2024 kl. 14.29 skrev Eli Zaretskii <eliz@gnu.org>:
> What you describe are possible fallbacks, but I would prefer not to
> use any fallback at all, but instead have a full C implementation.
Yes, I definitely think we should do that. I'm pretty sure that writing a JSON
unparser is a lot easier than doing the parser, and the extra speed we stand to
gain from not having the intermediate jansson step is not without interest.
Overall the proposed parser looks fine, nothing terribly wrong that can't be
fixed later on. A few minor points:
* The `is_single_uninteresting` array is hard to review and badly formatted. It
appears to be 1 for all printable ASCII plus DEL except double-quote and
backslash. (Why DEL?)
Happy if you would make that clearer, perhaps by formatting or initialising it
at run-time. (I don't think we can use GCC-style array interval designators,
alas.)
* Do you really need to maintain line and column during the parse? If you want
them for error reporting, you can materialise them from the offset that you
already have.
* Are you sure that GC can't run during parsing or that all your Lisp objects
are reachable directly from the stack? (It's the `object_workspace` in
particular that's worrying me a bit.)
- Re: I created a faster JSON parser, (continued)
Re: I created a faster JSON parser, Po Lu, 2024/03/08
Re: I created a faster JSON parser, Christopher Wellons, 2024/03/10
- Re: I created a faster JSON parser, Eli Zaretskii, 2024/03/10
- Re: I created a faster JSON parser, Philip Kaludercic, 2024/03/10
- Re: I created a faster JSON parser, Eli Zaretskii, 2024/03/11
- Re: I created a faster JSON parser,
Mattias Engdegård <=
- Re: I created a faster JSON parser, Herman , Géza, 2024/03/11
- Re: I created a faster JSON parser, Mattias Engdegård, 2024/03/12
- Re: I created a faster JSON parser, Gerd Möllmann, 2024/03/12
- Re: I created a faster JSON parser, Mattias Engdegård, 2024/03/12
- Re: I created a faster JSON parser, Gerd Möllmann, 2024/03/12
- Re: I created a faster JSON parser, Herman , Géza, 2024/03/15
- Re: I created a faster JSON parser, Gerd Möllmann, 2024/03/15
- Re: I created a faster JSON parser, Mattias Engdegård, 2024/03/19
- Re: I created a faster JSON parser, Gerd Möllmann, 2024/03/19
- Re: I created a faster JSON parser, Herman , Géza, 2024/03/19