emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What's missing in ELisp that makes people want to use cl-lib?


From: João Távora
Subject: Re: What's missing in ELisp that makes people want to use cl-lib?
Date: Sun, 12 Nov 2023 23:14:12 +0000

On Sun, Nov 12, 2023 at 10:09 PM Dmitry Gutov <dmitry@gutov.dev> wrote:

> So it seems on par with the hand-written version (byte-compiled, too)
> that hardcodes the test function.
>
> Curiously, though, if I make list2 longer (e.g. 12 elements rather than
> 6), then my/set-difference starts to win noticeably (0.166 vs 0.200).

I have a suspicion, I'll see what I can do.

More importantly, there's an important takeaway here.  Your
results seem to show that regardless of the alternative (cl-lib
or hand-rolled) the solution with Emacs's current recommended
sequence processing library is nearly 6 times slower in a
real-world use-case.

Maybe seq.el can be made faster too?  Who knows, but it seems
difficult without breaking at least some of its defgeneric-based
contract.

> I'll keep the real-world case as-is (code in project--vc-list-files)
> both because the result with cl-nset-difference is still a little
> slower, and because it's slower in all released emacsen, but it
> definitely becomes an option.

Not that I think it's worth it just for this, but isn't cl-lib.el a
:core package?  Theoretically, we could bump the version and depend
on that in project.el, as we do with other such things when one
dependency of a core package is enhanced.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]