[Top][All Lists]

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

Re: JSON/YAML/TOML/etc. parsing performance

From: Philipp Stephani
Subject: Re: JSON/YAML/TOML/etc. parsing performance
Date: Sun, 08 Oct 2017 23:14:18 +0000

Eli Zaretskii <address@hidden> schrieb am So., 8. Okt. 2017 um 20:42 Uhr:

I don't think we can bypass decoding in this case; the reason why you
think it isn't needed is because you only tried that with valid UTF-8
encoded text.  We never rely on that elsewhere, AFAIK.

Jansson only accepts UTF-8 strings, and at least in our usage will also only hand out UTF-8 strings.
I'd rather not include coding steps: given their complexity, they are very slow and make the code much more complex than necessary. Since we only deal with UTF-8 strings, and we can assume that Emacs strings are a superset of UTF-8 strings, we can completely avoid any coding operations.
It's totally OK to rely on this assumption since all code that's involved here is part of the Emacs core, so it can rely on implementation details.

reply via email to

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