From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#31138: Native json slower than json.el Date: Mon, 22 Apr 2019 18:24:22 +0300 Message-ID: <835zr66p21.fsf@gnu.org> References: <87sh806xwa.fsf@chapu.is> <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> <837ebnabkf.fsf@gnu.org> <83zhoj8shg.fsf@gnu.org> <6cc7472a-e9b2-5e30-3c44-1709056c02f5@yandex.ru> <83d0le8q8b.fsf@gnu.org> <3ae05c72-88bb-8748-2a2c-beae2d9a2746@yandex.ru> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="108231"; mail-complaints-to="usenet@blaine.gmane.org" Cc: sebastien@chapu.is, yyoncho@gmail.com, 31138@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 22 17:26:34 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 1hIaq2-000S3r-Bm for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Apr 2019 17:26:34 +0200 Original-Received: from localhost ([127.0.0.1]:38850 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hIaq1-000898-BH for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Apr 2019 11:26:33 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hIaob-0006qi-HB for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2019 11:25:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hIaoZ-0007yB-K4 for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2019 11:25:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37713) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hIaoZ-0007xm-0G for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2019 11:25:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hIaoY-0001ng-LV for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2019 11:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Apr 2019 15:25: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.15559466796876 (code B ref 31138); Mon, 22 Apr 2019 15:25:02 +0000 Original-Received: (at 31138) by debbugs.gnu.org; 22 Apr 2019 15:24:39 +0000 Original-Received: from localhost ([127.0.0.1]:51257 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hIaoB-0001mq-8c for submit@debbugs.gnu.org; Mon, 22 Apr 2019 11:24:39 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42126) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hIao8-0001mV-Si for 31138@debbugs.gnu.org; Mon, 22 Apr 2019 11:24:37 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42323) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hIao3-0007MZ-93; Mon, 22 Apr 2019 11:24:31 -0400 Original-Received: from [176.228.60.248] (port=3065 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hIao2-00062S-Lt; Mon, 22 Apr 2019 11:24:31 -0400 In-reply-to: <3ae05c72-88bb-8748-2a2c-beae2d9a2746@yandex.ru> (message from Dmitry Gutov on Mon, 22 Apr 2019 16:54:19 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:158046 Archived-At: > Cc: yyoncho@gmail.com, sebastien@chapu.is, 31138@debbugs.gnu.org > From: Dmitry Gutov > Date: Mon, 22 Apr 2019 16:54:19 +0300 > > On 22.04.2019 10:16, Eli Zaretskii wrote: > > Please don't forget that json-parse-string first_encodes_ the input > > string in UTF-8, then passes it to libjansson, then_decodes_ each > > string element it receives back. So we do some non-trivial processing > > besides make_specified_string, and removing decoding only saves part > > of that. > > That actually means that speeding up code_convert_string might > *potentially* (e.g. if it's infinitely fast) yield more than 50% > performance improvement. code_convert_string doesn't do much, it just calls the encoding or decoding function.