From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: JSON/YAML/TOML/etc. parsing performance Date: Thu, 28 Sep 2017 17:27:36 -0400 Message-ID: References: <87poaqhc63.fsf@lifelogs.com> <8360ceh5f1.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1506634125 22559 195.159.176.226 (28 Sep 2017 21:28:45 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 28 Sep 2017 21:28:45 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 28 23:28:42 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 1dxgMF-00059j-63 for ged-emacs-devel@m.gmane.org; Thu, 28 Sep 2017 23:28:35 +0200 Original-Received: from localhost ([::1]:60987 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxgMM-0007hP-HW for ged-emacs-devel@m.gmane.org; Thu, 28 Sep 2017 17:28:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41108) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxgLh-0007h6-HC for emacs-devel@gnu.org; Thu, 28 Sep 2017 17:28:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxgLc-000556-K7 for emacs-devel@gnu.org; Thu, 28 Sep 2017 17:28:01 -0400 Original-Received: from [195.159.176.226] (port=43442 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dxgLc-00054I-Bj for emacs-devel@gnu.org; Thu, 28 Sep 2017 17:27:56 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dxgLL-0001If-UO for emacs-devel@gnu.org; Thu, 28 Sep 2017 23:27:39 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 12 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:PHjOjrrS2vLSK7PH4txmMla1q1w= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:218871 Archived-At: > encoding is a superset of UTF-8. Also build_string should always be correct > because it will generate a correct multibyte string for an UTF-8 string > with non-ASCII characters, and a correct unibyte string for an ASCII > string, right? FWIW, I think that returning a unibyte string just because it doesn't contain non-ASCII chars would be wrong. We should only build unibyte strings if they represent a sequence of *bytes*, not when they represent a sequence of *chars* which happens to only be ASCII. Stefan