|
From: | Dmitry Gutov |
Subject: | bug#31138: Native json slower than json.el |
Date: | Wed, 24 Apr 2019 09:57:26 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
On 24.04.2019 9:20, Eli Zaretskii wrote:
We are talking about a function that expects UTF-8 strings, so "non-UTF-8" and "invalid UTF-8" are 2 different ways of saying the same thing.
Right, except for the emphasis. But since we're talking about documentation, there's a difference between saying "parsing of non-UTF-8 got slower" and "parsing of invalid UTF-8 got slower".
However, note that various 7-bit encodings will be taken by such an interface as valid UTF-8, since all the bytes are 7-bit ASCII. There's nothing we can do about that, just something to keep in mind (it isn't supposed to happen in correct usage).
IIUC, in the case the "proper" UTF-8 decoder would do exactly the same thing in this case as the "fast path" upon discussion.
BTW, this is a case one could call both "non-UTF-8" and "valid UTF-8".
[Prev in Thread] | Current Thread | [Next in Thread] |