From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: master 4b79c80c999 1/2: New function 'sort-on' Date: Mon, 04 Mar 2024 07:45:45 +0100 Message-ID: <87edcq8pgm.fsf@web.de> 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38075"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Yuri Khan , Eli Zaretskii , John Wiegley , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 04 07:46:11 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 1rh25S-0009dD-CC for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Mar 2024 07:46:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rh24k-0003Gd-SZ; Mon, 04 Mar 2024 01:45:27 -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 1rh24h-0003GC-19 for emacs-devel@gnu.org; Mon, 04 Mar 2024 01:45:23 -0500 Original-Received: from mout.web.de ([212.227.17.12]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rh24e-000238-Im; Mon, 04 Mar 2024 01:45:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1709534715; x=1710139515; i=michael_heerdegen@web.de; bh=ZgrpWhD1aWrMqZYzWCGvzRIg9bnWSz2gI9WlOikzhEs=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References: Date; b=CrHqjCLRi1Z8RqUmK8ciHvexk7pCURxsC1MrIpqEJyDqOfNgYrxtLipq55nCRqzy HBIvD+Zfne0Gu0mHudW3SOwnZef0FlpMuA45AVT55T43N52shm2oPelf+8CrL2+uH 4rxvTmojFbpRJ94vbl/1q/TueAxTTVRLpqMaiOjynA3ti2o/vr0DlT7c/8WeCA+Nh +4HOHUJra7tfnGebIs2I5LpljAO39/oGK+EYx+c+AQBt4VUjihTmIeTwmTzwkUP2n 6ZN4bQLlnlpacZUjS0I2oFs5n1HxqqnYv5wjoO/NDEhtrlw/5qX4yWC8CHTGp6uAu Ox69Bc8eg0QhItxwcA== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Original-Received: from drachen.dragon ([92.76.229.82]) by smtp.web.de (mrweb105 [213.165.67.124]) with ESMTPSA (Nemesis) id 1N8Vsx-1qlbv13jt3-014KwT; Mon, 04 Mar 2024 07:45:14 +0100 In-Reply-To: <8b31204f-4e8c-4c56-bbc7-73c9bfabb651@gutov.dev> (Dmitry Gutov's message of "Sat, 2 Mar 2024 01:37:01 +0200") X-Provags-ID: V03:K1:U7Nabu1Jr1c7AXS4IZldqkt/6vXQqknYZyePkP7J7hnGK0t0uuz jMUec3cDrenQ3woBGZ611tjq+EUf8sY4NeemQR4YKo4zASj9KJPNeugBM8ES7WnUJVSixHu 4Bp9ZUhkUgCWfUE8+GXeOXXvAL9ZMVSjMLrCCwRm5oDjzWojWfUzyzk5cCoAop0p7T0/aMn mMVw2FtPT6dvbT4x8SjYA== UI-OutboundReport: notjunk:1;M01:P0:Bhu6SMUUj/8=;w79VROQSJWtPYvV/lgVmqma9ZXv 83BjY2/ssAo6emb6j4y/0+sFeJDnqcstgqPNMVYhSbM3oH5AH8wsYUcfWWIuZHIxBfubiWKPE 3/QLOwDX9R3VViWvFOexCJQusG8QrATWN1VCpQ0uS2sCRAvN6l3T+zT+UI4Ts1LVxV5R/4vso a7nc9dKTZuq8kJoc9OxHKMjWSZj6ZB8Jooswa0bwbEol4OkuxVAY6MCd8IsTBcv7rHRnoybJf P6+pS1PafHRtj7mDbLXmQvbZF6gevOzARiX2r5DAuBW/V+itmSgWJvhNCpIeldq85uKcH6KEK oJQFSu/v8QE5ife+fQA/JirjVuCnp+n0NI8geSJaJ9Z0WzP2l0Pi1cXkDGx+38ZhT2dlqZO2J wyw2Nkgj1erFzewFTsq5uIVVFLk5OxpJi5XVohjUD/IMM1qWCh3J0DPhwsJl64/+t3DLps7wY ZQ6rb+z2zGitV6fFiKRAT7n/JXOuh068Q8T0e4BwNZg7Xa0g5L+ladSdBAJRNR5gdpIkuUjp/ MMlqDr9uyObb7sqnZPvRB/MqDl3aKZEr8BhqylQKFarnYSP8kHBrNVEYPeq1u6FjvSjBkZl0j pm+Uh/SDdEg/7k5GVswO/0F7ulJeoT0M6nzBjrgXSfz8uC9385G/spGw8ezX7uYwERjg/10Gd SC1VI7GHS+DO37Ptyl8RGUVVCaWd777FSC05dqRiW7MXN6LdbgYhDn9FiazVj1t2BBu5MlJ/n RFoHy+jy75aArtZ8IfFXTVtncoOJUE8jqiTdSfOjC2I8cCKBsfzoLm+Lg8N07BRKC23gUaJg Received-SPF: pass client-ip=212.227.17.12; envelope-from=michael_heerdegen@web.de; helo=mout.web.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=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:316781 Archived-At: Dmitry Gutov writes: > Well, 'mapcar' in it allocates a new sequence of length N. The > Schwartz transform creates about as many new cons cells too. If the > function is made destructive, 'mapcar' becomes unnecessary as the > original sequence could be reused - and that is measurably faster, too > (when the cost function is simple enough). > > And if it's made destructive, it becomes even closer to the current > 'sort'. That would mean less justification to keep them as separate > functions. This sounds reasonable to me. > > BTW, I wonder how this addition fits into my original suggestion about > > sort predicate construction. > > Sorry, I either can't find your respective message in this thread, or > don't understand the suggestion. See my original message "Add a function for building sort predicates" from 02/01 in this year. It's about refactoring and providing a convenient way to create kinds of sort predicates that are needed often in practice, like tabulated-list-mode's sorting column sorting. Michael.