From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#69709: `sort` interface improvement and universal ordering predicate Date: Sat, 23 Mar 2024 19:25:54 -0400 Message-ID: References: <86zfv6uqjn.fsf@gnu.org> <4391448A-C7AF-4D7F-8866-C0313956D52D@gmail.com> <8366111E-97C4-4839-AA1E-A577C81A6035@gmail.com> <4B7ACA81-DEB9-4878-BE0B-88A302AF7081@gmail.com> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18906"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 69709@debbugs.gnu.org, Gerd =?UTF-8?Q?M=C3=B6llmann?= , Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Eli Zaretskii To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 24 00:26:46 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1roAlB-0004m4-Og for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Mar 2024 00:26:45 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1roAkp-00016S-6B; Sat, 23 Mar 2024 19:26:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1roAkn-00016A-Ed for bug-gnu-emacs@gnu.org; Sat, 23 Mar 2024 19:26:21 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1roAkn-0007vy-5j for bug-gnu-emacs@gnu.org; Sat, 23 Mar 2024 19:26:21 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1roAlS-0001ax-7C for bug-gnu-emacs@gnu.org; Sat, 23 Mar 2024 19:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Mar 2024 23:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69709 X-GNU-PR-Package: emacs Original-Received: via spool by 69709-submit@debbugs.gnu.org id=B69709.17112364076088 (code B ref 69709); Sat, 23 Mar 2024 23:27:02 +0000 Original-Received: (at 69709) by debbugs.gnu.org; 23 Mar 2024 23:26:47 +0000 Original-Received: from localhost ([127.0.0.1]:32787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1roAlC-0001a7-Sb for submit@debbugs.gnu.org; Sat, 23 Mar 2024 19:26:47 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:6546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1roAlB-0001Zd-5d for 69709@debbugs.gnu.org; Sat, 23 Mar 2024 19:26:46 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 5F6E3441005; Sat, 23 Mar 2024 19:25:57 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1711236356; bh=RyevMyJgf+ToTS8P6czEEi025inmIQRvH6k6e9XTPgI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=BVShTpe4iBNEGZod9HBpiyA3qviOrvx87INnjsy9RCpTpxladfjOTBRm85pd32+Of omfQXqLF8ZmTn607RWOeZV/Su20wPV2agzWW6CjrXvwP8MJPLTV9vxbFlguHWpbIoa 2UOr/1mTArreeQLz96kYRGXJslheCCR25ixz/X0cOvAq6ZQxdBwX08Tu3JJh1uH0/o z0Kt2qFQXlYPitmdpDJll8XKY6OVsQLFff8FnH69sSQy8u0V+iCv1ErGrVaFad0yv9 m923YGhsFQUnxb1raWSY+w+RfjTStoun4BFjD4XvuDBxPLXBLy+SSMVw9RFLhQBEiN KKt769ySxN+gA== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 3002F440FF2; Sat, 23 Mar 2024 19:25:56 -0400 (EDT) Original-Received: from alfajor (unknown [104.247.238.200]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id ED7CC12072D; Sat, 23 Mar 2024 19:25:55 -0400 (EDT) In-Reply-To: (Dmitry Gutov's message of "Sun, 24 Mar 2024 01:19:09 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:282009 Archived-At: > IIUC we allocate an array internally as well during the sorting phrase, but > then we can't return it as-is or with a thin wrapper (if only because the > user expects back a list, not a vector), so we'll need to allocate a whole > new list to avoid mutating the original. And our GC is worse than JVM's. When it matters, people can use `:in-place`. Stefan