From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: master 4b79c80c999 1/2: New function 'sort-on' Date: Thu, 7 Mar 2024 03:34:12 +0200 Message-ID: References: <170688047526.14693.2994051491358257471@vcs2.savannah.gnu.org> <20240202132756.4272CC0EFE7@vcs2.savannah.gnu.org> <87cytej4hy.fsf@daniel-mendler.de> <86zfwi52m1.fsf@gnu.org> <87plxe28as.fsf@web.de> <86wmrm50i5.fsf@gnu.org> <3ff9d4cf-7b4f-4924-8663-3f43625760bf@gutov.dev> <87zfvldokn.fsf@web.de> <8b31204f-4e8c-4c56-bbc7-73c9bfabb651@gutov.dev> <87edcq8pgm.fsf@web.de> <6df7bc2e-4fc4-4ed8-8dfe-9b3b74c6ae8a@gutov.dev> <8734t5hzl2.fsf@web.de> <87frx5q8qp.fsf@web.de> <86v860luop.fsf@gnu.org> <877cighwqf.fsf@web.de> <864jdjlfxd.fsf@gnu.org> <3ef80237-e393-450a-a87f-7c588424f29f@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="331"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: Eli Zaretskii , Michael Heerdegen , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 07 02:35:28 2024 Return-path: Envelope-to: ged-emacs-devel@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 1ri2fP-000AMh-12 for ged-emacs-devel@m.gmane-mx.org; Thu, 07 Mar 2024 02:35:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ri2eT-0007oM-Hx; Wed, 06 Mar 2024 20:34:29 -0500 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 1ri2eR-0007nl-Il for emacs-devel@gnu.org; Wed, 06 Mar 2024 20:34:27 -0500 Original-Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ri2eL-0002lU-Va; Wed, 06 Mar 2024 20:34:27 -0500 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 08AB432004AE; Wed, 6 Mar 2024 20:34:15 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 06 Mar 2024 20:34:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1709775255; x=1709861655; bh=R5bxc8k+YoVJ+cgYnbQP587emJqv9CFCaT3AlQR358A=; b= hGqHSR+1mfRgP/Qi749yvevpO8qyHWXIXuaUyGdbAAJHcwwhSUJCUnMkHhUEsFG6 AbXeN5zsHqxg7g92f6Dy7WaHBmlQ9w7S/bN7HSYLu47ACIAH6imXNcQczVKHVEno DCF33wCUlDdwM9NOZ2K9VHOaaO9vlRfrLVPsOr1dkqs4lawHaVvExJ0Dhfyo1JRD kVi7Z3VE15ccMHbzjjJo9t7xL74hfcxM/1McbnrxRgqbzXWAhS0V5pLdgDsGtIxM NjeyKxDmgRoUcRy5CP3pURN6wC5cMPFtctBkATb6IXHrCOo55xDvYFElJQL1oU/z 4XDnAqUSfErZMt9nhHflHw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1709775255; x= 1709861655; bh=R5bxc8k+YoVJ+cgYnbQP587emJqv9CFCaT3AlQR358A=; b=Z sS4svWzr90kOllTQgu1i12SiyTEmV+c6UqzH5XDQjuK+xfaLS4Hl2Mk893s+K17Z aqou23LB7V9hlH5BBVmak9o7hVgCmbMzId/zYJKGpXCJ7ZJ0oq1ehL43r/IVBu3e dxXe/LxHWzHGa4AWTk5welskGsP9iZ1yWD9tVBvbtmRpTB3YRj98kG5vZSfm9Kf6 0fSYQb0oLd6PNKqofUUVv6kpc+v2OqPV5EaUe5FTk+2s5lF9y1KLctMCRJLHC/cN VA3pOZdKOZDYbwm1ZiC+zuOEaNNqkjTA7sCGcTj23CRn5vExup/PUGup5kz0o+Aq YuZ/GQNoR5O85B7xBHKPQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledriedvgdefhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfhfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeffmhhithhr hicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrthhtvg hrnhepgeeugeetffduvdejvedvleeliedtfedtudfhfeefffejudekveejvdeffffgveeg necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmih htrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 6 Mar 2024 20:34:14 -0500 (EST) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=64.147.123.21; envelope-from=dmitry@gutov.dev; helo=wout5-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:316869 Archived-At: On 06/03/2024 22:12, John Wiegley wrote: >>>>>> Dmitry Gutov writes: >> Here's a version from Daniel as well: > This version from Daniel looks pretty optimal to me. It trades building a > whole new list spine that is sent to GC, for an extra O(n) traversal to > “restore” each of the original list cells. Done in C, I have a feeling that > would beat the GC. Speed-wise, IIRC this version already beats the committed implementation. I'm talking about moving to C in the context of merging this feature with the basic 'sort' function. Because it really looks more fitting for a new optional argument now, rather than a separate function.