Subject: bug#70686: closed (Re: bug#70686: 30.0.50; cl--position is slow)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 01 Mar 2025 02:38:02 +0000

Your bug report

#70686: 30.0.50; cl--position is slow

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
70686: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70686
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#70686: 30.0.50; cl--position is slow
From: Stefan Kangas <[email-masked]>
To: Eli Zaretskii <[email-masked]>
Cc: [email-masked], No Wayman <[email-masked]>
Date: Fri, 28 Feb 2025 18:37:39 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Eli Zaretskii <[email-masked]> writes:

>> From: No Wayman <[email-masked]>
>> Cc: [email-masked]
>> Date: Wed, 01 May 2024 08:20:56 -0400
>>
>> It would be preferable to improve the performance of that
>> function, as it would benefit anyone using it.
>
> Sure, if you have a patch to improve performance, please share it.
>
> But otherwise asking for better performance here is not very useful,
> because we'd like to improve performance of everything in Emacs.  IOW,
> the need and the motivation exist, but without some practical
> suggestion how to improve there's no way to resolve such issues raised
> here.
>
> So:
>
>> Slow performance, especially in a widely used library like cl-lib,
>> is a bug.
>> Where would you prefer such observations be reported?
>
> I think only cases of abysmally inadequate and terribly slow
> performance should be reported as bugs, when there's no practical
> suggestion for improving the performance.
>
>> Are you confident the performance trade-off is due to dispatching
>> on sequence types in this case?
>> Do you think the performance could be improved without sacrificing
>> that flexibility?
>> I'll dig into it more when I have time, but I'm starting a
>> discussion here in case someone has already made an attempt or
>> knows the answers to those questions.
>
> Discussions generally don't belong here.  A better place for that is
> emacs-devel, if only because many more people read it.
>
> Thanks.

I'd tend to agree.  It's hard to do anything actionable with this bug
report.  Work on improving the performance of cl--position and
everything else is of course more than welcome.

I'm therefore closing this bug report.

Subject: 30.0.50; cl--position is slow
From: No Wayman <[email-masked]>
To: [email-masked]
Date: Tue, 30 Apr 2024 19:51:23 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

I've recently been avoiding cl-position, cl-remove-duplicates, and any other functions which use it internally. I realize there's a performance trade-off in for the flexibility such functions provide, but it may be worth investigating cl--position in particular. Today I replaced an instance of cl-remove-duplicates with an equivalent cl-loop for a 15x performance improvement at the cost of 2 lines of code.