From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#31138: Native json slower than json.el Date: Mon, 22 Apr 2019 15:58:57 +0300 Message-ID: <4b8c6799-e845-768b-749c-f2a883ab89f8@yandex.ru> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="236602"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 Cc: sebastien@chapu.is, yyoncho@gmail.com, 31138@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 22 15:00:19 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 1hIYYU-000zOo-If for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Apr 2019 15:00:18 +0200 Original-Received: from localhost ([127.0.0.1]:37155 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hIYYT-0002K1-KK for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Apr 2019 09:00:17 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:57028) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hIYYL-0002Hi-9U for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2019 09:00:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hIYYH-00058K-BL for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2019 09:00:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36607) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hIYYF-000542-Ct for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2019 09:00:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hIYYF-0006F9-3Q for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2019 09:00:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Apr 2019 13:00:03 +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.155593794823905 (code B ref 31138); Mon, 22 Apr 2019 13:00:03 +0000 Original-Received: (at 31138) by debbugs.gnu.org; 22 Apr 2019 12:59:08 +0000 Original-Received: from localhost ([127.0.0.1]:50151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hIYXM-0006DV-An for submit@debbugs.gnu.org; Mon, 22 Apr 2019 08:59:08 -0400 Original-Received: from mail-wm1-f42.google.com ([209.85.128.42]:50504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hIYXJ-0006D1-Ph for 31138@debbugs.gnu.org; Mon, 22 Apr 2019 08:59:06 -0400 Original-Received: by mail-wm1-f42.google.com with SMTP id z11so14477423wmi.0 for <31138@debbugs.gnu.org>; Mon, 22 Apr 2019 05:59:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=j/UvIDqtIdxbIv0ZmIferOsy4//7m/nF8yJ5NnbZgWY=; b=VKt3BZUx0isLADxjht/jgODCjoBZh8462kksCNMHPaccvajaME0u8geZxRf3ZoF1t4 9a7gmvh/0xKFuwY8jOvBSibcJc+f4BN2YejWHj1L7/tLENm/CdDJc19ObuM8S+8VVaLC UUWk4+bqt0wNPDRgzOq/r8ektN8DNQ4s8cQLUwkAHAobCuvJwhtDyUFFjy6nh24jxS58 snY24piEpp8MusbkSDXSg2AVFoVou95V7yuQT11BVBzIjkzjLjo6SfC0bdIwkr367gx9 OXO6q6RIRwEHUhI6P8fyu3gOU43CK4fQK/rzdfYN+R+fFOVFCq9aS+1oF+g/rYzI6I9w QZ2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=j/UvIDqtIdxbIv0ZmIferOsy4//7m/nF8yJ5NnbZgWY=; b=Wr8iAsmciQOgMdDU092cOPiFqHW3Px2YARIs1e/tvGEEMwrgh8i6TYBwlrNvWMzhOP PRHaN0Eado5NIVMdhsgkg9ToHwc1SPxF2OYCAi1r8OeU9XX4ASUJMshFCClPhysDS9SP FVCHEC8ASifletEYc/pCthGkefJGvHwhKBoB/zTRQ1gZcMp9NkfkYPAAM441NXFtkfDS gL+UOR+j2LaggzNJWypD1uLtIkQaMc8Hi/n5JA42Lj0LkzVRCQoDtGLsPb8+GzMe/F/6 RsbhZWiQryZoKtljsbBgRDDP6/2+c8VgpFPuyPlTrDstQ6L4omIlvdwZ2ReOw/CKAijF bD4A== X-Gm-Message-State: APjAAAWDcxxFSud4XF6IQ2wsRahARHatdf9FsW24w67mEg20HhQ1KyVi qpfOXpz4o7MfnHHU/Uaa9wHmIs5I X-Google-Smtp-Source: APXvYqw8DaoAiBA5Vs3GhsQ8zb71THx00z/dAhb4FJl+/aHSLcAlNo1sSUMc1qSf3l0aezQNH5X7gA== X-Received: by 2002:a1c:486:: with SMTP id 128mr12245862wme.3.1555937939606; Mon, 22 Apr 2019 05:58:59 -0700 (PDT) Original-Received: from [192.168.0.195] ([109.110.245.170]) by smtp.googlemail.com with ESMTPSA id o1sm17898663wmh.47.2019.04.22.05.58.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Apr 2019 05:58:58 -0700 (PDT) In-Reply-To: <83muki6y6r.fsf@gnu.org> Content-Language: en-US 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:158027 Archived-At: 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. > 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: 6.00% 229 emacs emacs [.] decode_coding_utf_8 5.31% 206 emacs libc-2.27.so [.] malloc 4.57% 177 emacs emacs [.] produce_chars 4.12% 164 emacs libc-2.27.so [.] malloc_consolidate 4.05% 161 emacs libc-2.27.so [.] cfree@GLIBC_2.2.5 3.38% 135 emacs libc-2.27.so [.] __memmove_avx_unaligned_erms 3.23% 125 emacs emacs [.] store_symval_forwarding 2.63% 102 emacs emacs [.] do_symval_forwarding 2.58% 104 emacs libc-2.27.so [.] _int_malloc 2.58% 100 emacs emacs [.] set_buffer_internal_2 2.41% 93 emacs emacs [.] allocate_vectorlike 2.08% 81 emacs emacs [.] json_to_lisp 1.90% 81 emacs emacs [.] detect_coding_utf_8 1.85% 72 emacs emacs [.] swap_in_symval_forwarding 1.72% 72 emacs emacs [.] detect_coding 1.38% 31 emacs emacs [.] insert_from_gap 1.29% 50 emacs libjansson.so.4.11.0 [.] json_delete 1.19% 46 emacs emacs [.] hash_lookup 1.01% 39 emacs emacs [.] decode_coding 1.01% 39 emacs libjansson.so.4.11.0 [.] json_array_get