From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.devel Subject: Re: JSON/YAML/TOML/etc. parsing performance Date: Sun, 08 Oct 2017 23:14:18 +0000 Message-ID: References: <87poaqhc63.fsf@lifelogs.com> <8360ceh5f1.fsf@gnu.org> <83h8vl5lf9.fsf@gnu.org> <83r2um3fqi.fsf@gnu.org> <43520b71-9e25-926c-d744-78098dad6441@cs.ucla.edu> <83r2udscpy.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a11489cf46530b5055b113c70" X-Trace: blaine.gmane.org 1507504477 30097 195.159.176.226 (8 Oct 2017 23:14:37 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 8 Oct 2017 23:14:37 +0000 (UTC) Cc: eggert@cs.ucla.edu, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 09 01:14:33 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1KmF-0007DF-Up for ged-emacs-devel@m.gmane.org; Mon, 09 Oct 2017 01:14:32 +0200 Original-Received: from localhost ([::1]:55400 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1KmN-0002hm-EK for ged-emacs-devel@m.gmane.org; Sun, 08 Oct 2017 19:14:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60958) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1KmH-0002hh-0t for emacs-devel@gnu.org; Sun, 08 Oct 2017 19:14:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1KmF-0008BS-Sa for emacs-devel@gnu.org; Sun, 08 Oct 2017 19:14:32 -0400 Original-Received: from mail-oi0-x22e.google.com ([2607:f8b0:4003:c06::22e]:45330) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e1KmE-0008AT-GL; Sun, 08 Oct 2017 19:14:30 -0400 Original-Received: by mail-oi0-x22e.google.com with SMTP id f3so36986925oia.2; Sun, 08 Oct 2017 16:14:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1O9mg2fglOThaltel2tYtf+ryjF63Ir0A/Met3+dPbI=; b=dlD8BXfs7CMuslU9wSX5qQu6Adjrd32JPqbTFpDVQcRGyM4qJxgVOj04tiJ39nbqD9 DJ024N4TVt4sbB0GLGFcdXx1dXeV8JBTr9kJf10gNANobfcC72Ma9NhHJ2S5x4MDo/SC 2DZoZlZgH3qfdrUyr8cliEF44oAko5w9xTubpi5FB7KtGzN2pbcytrHU+54RxsS/dj6Y rFR24SSwlx5QUXT/B7luUtZkPsuuH3qOb0lHSOUWRmtN3323jXXbemZvfspE0urNgnpq m0IJkknQ+OSYOqGVCJRkDT38cqQiTfFle0ZnxUrkqQ3hovhy2iLlaB6Yi2eRQDp2HPuR gOBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1O9mg2fglOThaltel2tYtf+ryjF63Ir0A/Met3+dPbI=; b=Ne3csSKxqnpKHWAnsldaqe8BevbnJ1uR4/FocomorEOahFQ4K7QYvjWNJHq2iFIiXn Q0r++UU+jPkyrZTZhGBdoEJenLfqWYnW2+mLf3vbWUGvb2Z2v0BM5viqgHlFtwoTGR8g t4wteuIZbM3yCTSH/w6lDTqJN2MqKFxdenj1GYDtb+wkwMA8AdWzZzIfbV8cgZK3i4NR zAC2mQjBrXUf6bIHLNhDUtk1ow6Re7tEOlG9pt+RjyXmpXiyhe1R6/KGH+zcBy4uoWza ybrQpmXPJM7Q5eXU2Dd7XSedajvPkkh07u52PWjAtH69qjeXBWaARxHqFhdD0q8EDg+v qrew== X-Gm-Message-State: AMCzsaUqWE0YOqxVTOF7nPP0mONxWUfRTPOmVKgsd48nDWdB5cL9ytmT jK41wGW7SnKdOVYqYMCS08iVv1r0Hr/gytTIIUpbvg== X-Google-Smtp-Source: AOwi7QA0N20WjePZOfJfyTZnu+fdw1sqM9L7tLILubnltEHvdRRC8xAV6EvAzJxiKoOom9wA9lU2k829HFIc4DQLhvs= X-Received: by 10.157.68.38 with SMTP id u35mr5367890ote.415.1507504469387; Sun, 08 Oct 2017 16:14:29 -0700 (PDT) In-Reply-To: <83r2udscpy.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::22e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:219278 Archived-At: --001a11489cf46530b5055b113c70 Content-Type: text/plain; charset="UTF-8" Eli Zaretskii 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. --001a11489cf46530b5055b113c70 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Eli Za= retskii <eliz@gnu.org> schrieb am= So., 8. Okt. 2017 um 20:42=C2=A0Uhr:

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.=C2=A0 We never rely on that elsewhere, AFAIK.

Jansson only accepts UTF-8 strings, and at least in ou= r 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 st= rings, 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 p= art of the Emacs core, so it can rely on implementation details.
--001a11489cf46530b5055b113c70--