[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: I created a faster JSON parser
From: |
Philip Kaludercic |
Subject: |
Re: I created a faster JSON parser |
Date: |
Fri, 08 Mar 2024 11:41:40 +0000 |
"Herman, Géza" <geza.herman@gmail.com> writes:
> Hi,
>
> I created a faster JSON parser for emacs, you can check it out here:
>
> https://github.com/geza-herman/emacs/tree/faster-json-parsing
For convenience, this is a URL to the patch:
https://github.com/geza-herman/emacs/commit/d76feeeac3ce397f15aebdde8b9deae676b0bf1e.patch
>
> 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.
Is that a problem?
> 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.
That sounds interesting, but I am reminded of this article:
https://seriot.ch/projects/parsing_json.html. There seem to be plenty
of difficult edge-cases when dealing with JSON input, that should
probably be tested if Emacs has it's own custom parser built-in.
> What do you think?
>
> Geza
--
Philip Kaludercic on peregrine
- I created a faster JSON parser, Herman , Géza, 2024/03/08
- Re: I created a faster JSON parser,
Philip Kaludercic <=
- Re: I created a faster JSON parser, Eli Zaretskii, 2024/03/08
- Re: I created a faster JSON parser, Herman , Géza, 2024/03/08
- Re: I created a faster JSON parser, Eli Zaretskii, 2024/03/08
- Re: I created a faster JSON parser, Herman , Géza, 2024/03/08
- Re: I created a faster JSON parser, Eli Zaretskii, 2024/03/08
- Re: I created a faster JSON parser, Collin Funk, 2024/03/08
- Re: I created a faster JSON parser, Herman , Géza, 2024/03/08
- Re: I created a faster JSON parser, Eli Zaretskii, 2024/03/08
- Re: I created a faster JSON parser, Herman , Géza, 2024/03/08