From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Simen =?UTF-8?Q?Heggest=C3=B8yl?= Newsgroups: gmane.emacs.bugs Subject: bug#21616: [PATCH] Enable sorting of JSON object keys when encoding Date: Thu, 12 Nov 2015 18:37:33 +0100 Message-ID: <1447349853.2400.0@smtp.gmail.com> References: <87twq6e986.fsf@gmail.com> <563FE255.5080506@yandex.ru> <1447268373.11049.0@smtp.gmail.com> <5643FBC6.2000401@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=-3kDNtzq+6ZttuzjdkXBi" X-Trace: ger.gmane.org 1447349906 4505 80.91.229.3 (12 Nov 2015 17:38:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 12 Nov 2015 17:38:26 +0000 (UTC) Cc: 21616-done@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 12 18:38:17 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zwvp7-0004mH-Tp for geb-bug-gnu-emacs@m.gmane.org; Thu, 12 Nov 2015 18:38:14 +0100 Original-Received: from localhost ([::1]:48454 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zwvp7-00014X-7M for geb-bug-gnu-emacs@m.gmane.org; Thu, 12 Nov 2015 12:38:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51595) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zwvp3-00013Z-9P for bug-gnu-emacs@gnu.org; Thu, 12 Nov 2015 12:38:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zwvox-00020u-Us for bug-gnu-emacs@gnu.org; Thu, 12 Nov 2015 12:38:09 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44237) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zwvox-00020f-Rq for bug-gnu-emacs@gnu.org; Thu, 12 Nov 2015 12:38:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Zwvow-0002Kq-HV for bug-gnu-emacs@gnu.org; Thu, 12 Nov 2015 12:38:02 -0500 Resent-From: Simen =?UTF-8?Q?Heggest=C3=B8yl?= Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Nov 2015 17:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 21616 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 21616@debbugs.gnu.org, simenheg@gmail.com, simenheg@gmail.com Original-Received: via spool by 21616-done@debbugs.gnu.org id=D21616.14473498778957 (code D ref 21616); Thu, 12 Nov 2015 17:38:02 +0000 Original-Received: (at 21616-done) by debbugs.gnu.org; 12 Nov 2015 17:37:57 +0000 Original-Received: from localhost ([127.0.0.1]:34943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zwvoq-0002KM-DW for submit@debbugs.gnu.org; Thu, 12 Nov 2015 12:37:56 -0500 Original-Received: from mail-lf0-f50.google.com ([209.85.215.50]:33609) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZwvoW-0002Jr-9l for 21616-done@debbugs.gnu.org; Thu, 12 Nov 2015 12:37:54 -0500 Original-Received: by lffz63 with SMTP id z63so38512988lff.0 for <21616-done@debbugs.gnu.org>; Thu, 12 Nov 2015 09:37:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:subject:to:cc:message-id:in-reply-to:references :mime-version:content-type; bh=PGSHDEPBa6WdWOHWh4LC31+B8HaJI4I7/YSjjX/UEKo=; b=fzGMEwgol27AeDDBAFqcJtdmGRYOiCzgk6vwd9rOriACOG+DYaC24MH/jT8wH92k0F TDT4RTstAfpN9TJ3XNHl5/I8nrP4XIuFEKMZCJiAnlE5hSFOxevDJ0/QtTNo0yvYpSBs layXdBIsDzZ4ILDJ9X6rC8UHyhZ5qsB58qQce58VY+Yy6Kf9wfqbSpq3Xo8FwDbgdqEA yHX7k01TUuhYu7okJviiKRRyrVpRG1jQP7AlM336TJH874dur+kMmNtUQZHljusQ/Lkw n9lRxqaGpGMcLm1HZMqk4m4cno0Tn+LYFoTbx6VZLV2jvzKQWc/FgeJ+v+J/z37JpI/A S7ng== X-Received: by 10.25.132.147 with SMTP id g141mr8109178lfd.106.1447349855404; Thu, 12 Nov 2015 09:37:35 -0800 (PST) Original-Received: from [192.168.100.7] (cm-84.210.143.4.getinternet.no. [84.210.143.4]) by smtp.gmail.com with ESMTPSA id q1sm2432639lbb.5.2015.11.12.09.37.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Nov 2015 09:37:34 -0800 (PST) In-Reply-To: <5643FBC6.2000401@yandex.ru> X-Mailer: geary/0.10.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:108653 Archived-At: --=-3kDNtzq+6ZttuzjdkXBi Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Thanks for your time, Dmitry. Installed! On Thu, Nov 12, 2015 at 3:39 AM, Dmitry Gutov wrote: > Hi Simen, >=20 > On 11/11/2015 08:59 PM, Simen Heggest=C3=B8yl wrote: >=20 >> How about keeping the old encoding code as the default, and only do=20 >> the >> {hash-table, plist} =E2=86=92 alist transform when the output is to be=20 >> sorted? >> That keeps new code to a minimum, and the they would need to be >> transformed to an intermediate structure to be sorted anyway. >>=20 >> A patch implementing this suggestion is attached. Here are the same >> benchmarks with the new patch applied: >=20 > LGTM, please install. Thanks. = --=-3kDNtzq+6ZttuzjdkXBi Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thanks for your time, Dmitry. Installed!

On Thu, Nov 12, 2015 at 3:= 39 AM, Dmitry Gutov <dgutov@yandex.ru> wrote:
Hi Simen, On 11/11/2015 08:59 PM, Simen Heggest=C3=B8yl wrote:
How about keeping the old encoding code as the default, and onl= y do the {hash-table, plist} =E2=86=92 alist transform when the output is to be sort= ed? That keeps new code to a minimum, and the they would need to be transformed to an intermediate structure to be sorted anyway. A patch implementing this suggestion is attached. Here are the same benchmarks with the new patch applied:
LGTM, please install. Thanks.
= --=-3kDNtzq+6ZttuzjdkXBi--