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 16:12:13 +0300 Message-ID: <83h8aq6v6a.fsf@gnu.org> References: <87sh806xwa.fsf@chapu.is> <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> <83ftqa8qsg.fsf@gnu.org> <83muki6y6r.fsf@gnu.org> <4b8c6799-e845-768b-749c-f2a883ab89f8@yandex.ru> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="26275"; 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 15:13:17 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 1hIYl1-0006j6-TS for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Apr 2019 15:13:16 +0200 Original-Received: from localhost ([127.0.0.1]:37367 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hIYl0-0006mR-TN for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Apr 2019 09:13:14 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hIYkr-0006je-9A for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2019 09:13:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hIYkp-0005uu-Dz for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2019 09:13:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36644) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hIYkp-0005uk-0B for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2019 09:13:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hIYko-0006bO-QC for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2019 09:13: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 13:13: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.155593875225326 (code B ref 31138); Mon, 22 Apr 2019 13:13:02 +0000 Original-Received: (at 31138) by debbugs.gnu.org; 22 Apr 2019 13:12:32 +0000 Original-Received: from localhost ([127.0.0.1]:50187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hIYkJ-0006aQ-Ix for submit@debbugs.gnu.org; Mon, 22 Apr 2019 09:12:31 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45377) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hIYkI-0006a9-4C for 31138@debbugs.gnu.org; Mon, 22 Apr 2019 09:12:30 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40496) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hIYkC-0005WQ-Uy; Mon, 22 Apr 2019 09:12:24 -0400 Original-Received: from [176.228.60.248] (port=2873 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hIYkA-00046O-RU; Mon, 22 Apr 2019 09:12:23 -0400 In-reply-to: <4b8c6799-e845-768b-749c-f2a883ab89f8@yandex.ru> (message from Dmitry Gutov on Mon, 22 Apr 2019 15:58:57 +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:158033 Archived-At: > Cc: sebastien@chapu.is, yyoncho@gmail.com, 31138@debbugs.gnu.org > From: Dmitry Gutov > Date: Mon, 22 Apr 2019 15:58:57 +0300 > > On 22.04.2019 15:07, Eli Zaretskii wrote: > > I don't know why. In my profiles I enlarged the iteration count to > > 100, and also enlarged the sampling frequency. Maybe that's the > > reason. > > I posted my invocations here, with all arguments. I didn't see yours. They are the same. The difference is that you visit the file inside the benchmark loop, whereas I left only the conversion inside the loop. AFAIU, doing so produces a better measurement of the JSON parsing part alone. > > The percentage taken by decode_coding_utf_8 didn't change as > > result, FWIW. > > Maybe it's not the only bottleneck. What about produce_chars? And > malloc, of course. Here's the top of my profiling report again: produce_chars is a subroutine of any decoding routine, including decode_coding_utf_8, so I added that to the score. In my profile, produce_chars took 3.77%.