emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I created a faster JSON parser


From: Po Lu
Subject: Re: I created a faster JSON parser
Date: Fri, 08 Mar 2024 21:28:27 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

"Herman, Géza" <geza.herman@gmail.com> writes:

> I created a faster JSON parser for emacs, you can check it out here:
>
> https://github.com/geza-herman/emacs/tree/faster-json-parsing
>
> It replaces json-parse-string and json-parse-buffer functions. The
> behavior should be the same as before, with the only exception that
> objects with duplicated keys are not detected if :object-type is not
> 'hash-table.
>
> This parser runs 8-9x faster than the jansson based parser on my
> machine (tested on clangd language server messages).  An additional
> tiny benefit is that large integers are parsed, instead of having an
> "out of range" error.
>
> What do you think?

Speed aside, this change eliminates an external dependency from Emacs,
which is a great service to us in its own right.  Thank you!

Nevertheless, there are several coding style issues that should be
resolved, viz. the presence of redundant opening braces and ternary or
nested binary operations not enclosed in parentheses, and the size of
the change is such that its copyright must be assigned to the FSF.

Please see that these are addressed, and thanks again.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]