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: Tue, 23 Apr 2019 14:44:47 +0300 Message-ID: References: <87ftq96gww.fsf@gmail.com> <83imv56gke.fsf@gnu.org> <87bm0x6cnq.fsf@gmail.com> <12721b41-c493-8193-b820-9ab4b229f102@yandex.ru> <877ebl5sjx.fsf@gmail.com> 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="109536"; 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: 31138@debbugs.gnu.org To: Alex Gramiak Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 23 13:45:14 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 1hItrM-000SKR-5o for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Apr 2019 13:45:12 +0200 Original-Received: from localhost ([127.0.0.1]:52256 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hItrL-0001ik-2Y for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Apr 2019 07:45:11 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39954) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hItrC-0001h5-UG for bug-gnu-emacs@gnu.org; Tue, 23 Apr 2019 07:45:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hItrB-0003YH-UO for bug-gnu-emacs@gnu.org; Tue, 23 Apr 2019 07:45:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39049) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hItrB-0003Y2-Me for bug-gnu-emacs@gnu.org; Tue, 23 Apr 2019 07:45:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hItrB-0004eP-KM for bug-gnu-emacs@gnu.org; Tue, 23 Apr 2019 07:45:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Apr 2019 11:45:01 +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.155601989817853 (code B ref 31138); Tue, 23 Apr 2019 11:45:01 +0000 Original-Received: (at 31138) by debbugs.gnu.org; 23 Apr 2019 11:44:58 +0000 Original-Received: from localhost ([127.0.0.1]:52593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hItr8-0004dt-DR for submit@debbugs.gnu.org; Tue, 23 Apr 2019 07:44:58 -0400 Original-Received: from mail-lj1-f175.google.com ([209.85.208.175]:36459) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hItr6-0004dd-Lf for 31138@debbugs.gnu.org; Tue, 23 Apr 2019 07:44:57 -0400 Original-Received: by mail-lj1-f175.google.com with SMTP id l23so2618377lja.3 for <31138@debbugs.gnu.org>; Tue, 23 Apr 2019 04:44:56 -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=8T5PkBO8xfp4OVzUc6aAMaLepvGDtxcblZUmSFqOBkI=; b=I8VGRkqX+GlxFi1f4t8aze0WwIYSjUr+c0yBD1BNpBTuSaWih/6wh8Rtg2LnfH5wOH Z5eQ1ZmRalNt7Lb1PsmZ/c2sJnnoqwnx88b4nDqVg6deeCQ7XIlafjaH0Wy2tWcGO1Hv s1TjCKtT3eZ98T2vjANwGAf6laP6s+3dw2EQKKb6jTm6EVqpjNSw0x/HwwWRHNanh89s C8P8dlxJe8pnYAu/RV4OMBRp+4qMD1IrvXDJeklvgqoiqnqErtH97ekub5e0pexxlBvt 8LdVt7K6vI/TCEjCJ4p8N2ONmyreDvo7uMmqXat44j7EJNWw1J7VJPQzLlIM+SnR26Ia AUQg== 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=8T5PkBO8xfp4OVzUc6aAMaLepvGDtxcblZUmSFqOBkI=; b=YAtw0ktipUjkiHbHmns4CP97RG3F8iWA8o6LRgAg41EDtvpa39gcqGX3KfkdYNhyep VQ4UVtKIZytbsu+ET2TK7wbEF/gNc+JiFy91MtdKOqDOgPPIDSnXTKEoNm9JWAJk2AUd 63zTZg/CwKnxjZoA0IE6QpEeMKnNL/S45OuAECycb/s3SYQ1fQtUBjNSqqul+IRgh8Bd BAvjrUHkZfNnB1l4G8L8Y38AlpY+L64Lhijm+Ax/wYWzWpPgxiRlYU/9h2c4HDPTyvEc G4lvpOguWPTkZT/JUeRx09Nz+WCBxffNCwuZElmkiVu1AqXupZKHlMxkEHNni5CgRu+V B6Hg== X-Gm-Message-State: APjAAAU2MnLy41JNAm8L/jo+8NlEJULa8wsUT8dGkyGRqokf2jfHz2jS jjmbt086Z5HrbsKWUyH/nRbzo5+d X-Google-Smtp-Source: APXvYqza/xjnajvoKxZ84fxzu0FUWeuNI0PZkYj7dlJqtdHR2YGjovyubHugMeoyZXExyYu1Z/9CEg== X-Received: by 2002:a2e:8149:: with SMTP id t9mr13371292ljg.2.1556019890477; Tue, 23 Apr 2019 04:44:50 -0700 (PDT) Original-Received: from [192.168.1.3] ([185.105.174.23]) by smtp.googlemail.com with ESMTPSA id 30sm3284712ljv.79.2019.04.23.04.44.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Apr 2019 04:44:49 -0700 (PDT) In-Reply-To: <877ebl5sjx.fsf@gmail.com> 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:158121 Archived-At: On 23.04.2019 6:06, Alex Gramiak wrote: > I tried making a couple patches in other areas to json.c that I hoped > would slightly improve performance, which I'll include here for > posterity. The first one uses json_dumpb over json_dumps, but from what > I can tell using it is either slower or just within error. The second > uses the *_nocheck functions where applicable, but the results seemed to > be quite similar. I suppose this means that jansson's utf-8 checking is > performant. You might also want to try it on larger JSON documents, documents that include more numbers, etc. With a JSON string this small, the benchmark loop might be taking most of the runtime. Anyway, thank you for the try and the benchmarking. At this point I'm still hoping for larger gains, and they'll probably come from some higher-level changes.