From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#57079: 29.0.50; Performance of seq-uniq is not very good Date: Tue, 09 Aug 2022 20:59:03 +0300 Message-ID: <838rnxti1k.fsf@gnu.org> References: <83tu6ltlcq.fsf@gnu.org> <87y1vxwe0y.fsf@gnus.org> <83k07htjxf.fsf@gnu.org> <87o7wtwcu9.fsf@gnus.org> <83fsi5tj31.fsf@gnu.org> <87k07hwbgs.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24015"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57079@debbugs.gnu.org, stefan@marxist.se To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 09 20:14:02 2022 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 1oLTjt-00060u-Gl for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Aug 2022 20:14:01 +0200 Original-Received: from localhost ([::1]:46516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLTjs-0002TY-AN for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Aug 2022 14:14:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57746) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLTWM-0007Xe-Nj for bug-gnu-emacs@gnu.org; Tue, 09 Aug 2022 14:00:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55107) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLTWM-0002If-E3 for bug-gnu-emacs@gnu.org; Tue, 09 Aug 2022 14:00:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oLTWM-0006BV-8C for bug-gnu-emacs@gnu.org; Tue, 09 Aug 2022 14:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Aug 2022 18:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57079 X-GNU-PR-Package: emacs Original-Received: via spool by 57079-submit@debbugs.gnu.org id=B57079.166006796123699 (code B ref 57079); Tue, 09 Aug 2022 18:00:02 +0000 Original-Received: (at 57079) by debbugs.gnu.org; 9 Aug 2022 17:59:21 +0000 Original-Received: from localhost ([127.0.0.1]:44856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLTVh-0006AB-2J for submit@debbugs.gnu.org; Tue, 09 Aug 2022 13:59:21 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44740) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLTVf-00069y-52 for 57079@debbugs.gnu.org; Tue, 09 Aug 2022 13:59:19 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44440) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLTVZ-0002F9-T9; Tue, 09 Aug 2022 13:59:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=nhMfCuPRR8X1+u5kxTg6bINt900MLNHZ+gcwNyMqmrU=; b=AalWQkl/Lfuv 1vOwC1xR4dd9n9WEIuzRtOUcKqTi1EthCQ0aVR8TvWJFo7+4KwhdmBEv3oFNOby1/S+tMlLbs326U sBpgmcFYRK8WnvtBQsrfmfptKKKJpS80BZfS9P78U0C1Zvmg3+qoWgMXaYxCmOqfnxuvxwQlVQKL4 +9Hn6R3O8BmYOxZhaGxw5XJcdjjNcpQi3Km/mbhvl5E0zqiYqIlFwTd89eiY/zZ7hf7Yj1kMqqMZR 4HcsmfsAKvFceSAlGkv9rzilU1tRCmbWw4re4INFSFT5r3yxMYWTBJIpnHhXGpBgNXlhpaVv5aG/K oAyZ+hiLru20L/AHgL5+NA==; Original-Received: from [87.69.77.57] (port=2631 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLTVZ-0006ed-Br; Tue, 09 Aug 2022 13:59:13 -0400 In-Reply-To: <87k07hwbgs.fsf@gnus.org> (message from Lars Ingebrigtsen on Tue, 09 Aug 2022 19:52:51 +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" Xref: news.gmane.io gmane.emacs.bugs:239187 Archived-At: > From: Lars Ingebrigtsen > Cc: stefan@marxist.se, 57079@debbugs.gnu.org > Date: Tue, 09 Aug 2022 19:52:51 +0200 > > Eli Zaretskii writes: > > > But the above means that using seq-uniq with TESTFN nil is going to be > > unnecessarily slow from the get-go. People shouldn't use seq-uniq if > > they don't need a non-default TESTFN, because much faster > > implementations exist. > > > > IOW, since this bug is about speed, not anything else, I think making > > seq-uniq faster when TESTFN is nil isn't the right solution, the right > > solution is to point out that seq-uniq's purpose in this case is not > > to be a Speedy Gonzales. > > I didn't make seq-uniq faster just when TESTFN is nil -- I made it > faster for all lists, so I don't follow you at all here. My point is that it will never be as fast as the implementations Stefan deleted, replacing them with seq-uniq. My point is that those changes just made several places in Emacs slower, even after your speedup, for no good reason. Those deleted functions, if they needed to be deleted, should have been replaced by a different implementation, which doesn't support TESTFN and is therefore faster, as the original implementations, now deleted, were.