From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: yyoncho Newsgroups: gmane.emacs.bugs Subject: bug#31138: Native json slower than json.el Date: Sun, 21 Apr 2019 13:23:28 +0300 Message-ID: References: <87sh806xwa.fsf@chapu.is> <83r2awnw0w.fsf@gnu.org> <83d0mgnn31.fsf@gnu.org> <835zs7och6.fsf@gnu.org> <83tvfqnbxc.fsf@gnu.org> <83lg12n75s.fsf@gnu.org> <83h8bqn2ik.fsf@gnu.org> <83zhphliil.fsf@gnu.org> <181b93a3-3861-0481-1b95-8344410d1049@yandex.ru> <83r2a2hdxn.fsf@gnu.org> <21f68973-a684-2a65-82eb-c8f3df90127f@yandex.ru> <83d0lmgez2.fsf@gnu.org> <7d503be9-4d85-3d0b-6829-631ad376ba3d@yandex.ru> <831s22gcci.fsf@gnu.org> <83y349gasn.fsf@gnu.org> <83d0lfag4x.fsf@gnu.org> <5cf45a21-65c3-67ee-f123-be83a6ee7c99@yandex.ru> <83a7gjaen6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000e3e9d2058707be1b" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="227368"; mail-complaints-to="usenet@blaine.gmane.org" Cc: =?UTF-8?Q?S=C3=A9bastien?= Chapuis , Dmitry Gutov , 31138@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 21 12:24:23 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hI9e3-000x3S-3l for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Apr 2019 12:24:23 +0200 Original-Received: from localhost ([127.0.0.1]:51290 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hI9e1-0003gy-QP for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Apr 2019 06:24:21 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59093) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hI9dt-0003gn-Bv for bug-gnu-emacs@gnu.org; Sun, 21 Apr 2019 06:24:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hI9dn-0004CL-Ph for bug-gnu-emacs@gnu.org; Sun, 21 Apr 2019 06:24:09 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34253) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hI9di-00048i-Lv for bug-gnu-emacs@gnu.org; Sun, 21 Apr 2019 06:24:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hI9di-0003mM-Fm for bug-gnu-emacs@gnu.org; Sun, 21 Apr 2019 06:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: yyoncho Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Apr 2019 10:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31138 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 31138-submit@debbugs.gnu.org id=B31138.155584222814501 (code B ref 31138); Sun, 21 Apr 2019 10:24:02 +0000 Original-Received: (at 31138) by debbugs.gnu.org; 21 Apr 2019 10:23:48 +0000 Original-Received: from localhost ([127.0.0.1]:47795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hI9dU-0003lo-H0 for submit@debbugs.gnu.org; Sun, 21 Apr 2019 06:23:48 -0400 Original-Received: from mail-lf1-f41.google.com ([209.85.167.41]:43906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hI9dS-0003lb-MU for 31138@debbugs.gnu.org; Sun, 21 Apr 2019 06:23:47 -0400 Original-Received: by mail-lf1-f41.google.com with SMTP id i68so7018053lfi.10 for <31138@debbugs.gnu.org>; Sun, 21 Apr 2019 03:23:46 -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=PpF0toTGzTTRjxeBkQu8hUSwLb661nlhjk1ViXnTX9c=; b=CFX1jjLkEULjGBb7Md5KMNS2+qh9hQT7OkmiAjnDapPP/BtM5qQdTuFjastNAChNKV K0wn+aLxFelA7EEJJLjWvJwetlr6MvFgMdBzR+MtiMNa5g0F563t4Uqvp3DRw7QCZ5e5 AnMbi4dOhW8frK9lXYrDL4JsXqnZpSc4P0qyuM0drRa3AwqQ2PdOv12xFsNXuJhONUrA 3uchPYk5pqEjwYBNh6hovv7Pi9dti5eOzR4iUI7n1bzK2EdG16bCWcMJkzV/9Othze9K 6n3dOq2dNgtKm3ZpTmA4og6Hdb4Eg7Xb8fvO/YGDDZdAiR7S/xpeAOZmqfE8R0YDgWPV yt1g== 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=PpF0toTGzTTRjxeBkQu8hUSwLb661nlhjk1ViXnTX9c=; b=KSEpZI0ClnVpqzOgNZibOx9JC1Qxi1Vl9a6LTFfbKZHhHBHI6Yz49wl+cK+c72ROCB 5hG/DFgK0PYOZLoYns38DgSV8deexcIL3jnLf/oPDsGtWXOecekL8RTwycxyjuRZHaH8 ORG7NAs9hJtGkj9Jv0jm2Q2l8jiTbfGT8+imQk0IKCiFIxZFgMh86dlRQLo0yhM8TOey qjUWqhnh2PZkyKaHqXMrh5B0Y/wg5D1mUsO+SHlkRpEFd1VskbkGa6TLvdVjyVuwkpsG 4C/TdWR6ebjttTMn1JmDeNO2cZhif4JCtMWnDtF5OKUyE6LokqxV35yETHIAnyNl9N78 yh2w== X-Gm-Message-State: APjAAAXAVKaeEXSOC5bUal6W30n7yH2C5S7uxjNF92F9XB64n/0IYg+d w1VSjB7fI7XoqF/u/LzoE7OcHkj637TFEXg6FDQ= X-Google-Smtp-Source: APXvYqwNE0p4MNRVWZCeccGzEiY6Ow4FJBUhjAdshTNIMMBpJWoiAkq5616goD2VhGcfoL/cZ5YQTc94bgGXKTbsgMc= X-Received: by 2002:a19:f013:: with SMTP id p19mr7104894lfc.49.1555842220680; Sun, 21 Apr 2019 03:23:40 -0700 (PDT) In-Reply-To: <83a7gjaen6.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:157936 Archived-At: --000000000000e3e9d2058707be1b Content-Type: text/plain; charset="UTF-8" Hi Eli, > In any case, even if decoding takes 50% of the time we spend in Emacs > code, it is still not significant enough to justify the un-safety of > using a string that we didn't decode, because if that string ever > includes raw bytes, Emacs will surely crash. > IMO if validation of the data that comes from external libraries is taking a lot of time then it does not make sense to use external libraries at all when we are aiming for performance gains. Thanks, Ivan --000000000000e3e9d2058707be1b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Eli,


In any case, even if decoding takes 50% of the time we spend in Emacs
code, it is still not significant enough to justify the un-safety of
using a string that we didn't decode, because if that string ever
includes raw bytes, Emacs will surely crash.

IMO if validation of the data that comes from external libraries is t= aking a lot of time then it does not make sense to use external libraries a= t all when we are aiming for performance gains.

Th= anks,
Ivan=C2=A0

--000000000000e3e9d2058707be1b--