emacs-devel
[Top][All Lists]
Advanced

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

Re: complexity in minibuffer


From: João Távora
Subject: Re: complexity in minibuffer
Date: Wed, 2 Jun 2021 19:30:20 +0100

On Wed, Jun 2, 2021 at 7:11 PM Dmitry Gutov <dgutov@yandex.ru> wrote:

> I think I get it now, thanks: key-and-transform, which you proposed
> group-function would return, would have a transformer _function_ in its
> CDR. So overall it should be approximately as powerful as the current
> approach. An allocation of 10000 lambdas in the interpreter takes about
> 4 ms here, which is not too much.

Yes, you got it.

Your numbers, in line with my measurements here.  But it varies (not
much) if the lambdas are closures or mere functions (where I suppose
the compiler would only allocate one of them).

Mind you that we could _also_  allow the backend to return the
transformation immediately if it's cheap, happens to be already
available somehow. That, in turn, would speed up scrolling, for example.

> Overall it's a valid idea, not without its elegance, but I don't think
> it's a definite enough improvement to ask everybody to rewrite their
> code, which uses the current definition of group-function.

Right, it was just a passing suggestion, an idea among many,
as I was looking at minibuffer.el for ways to rework
annotation/completions display and stuff.  Really wound up defending
waaay more than I expected.

As far as I understand only minibuffer.el and vertico.el use group-fn.
It's quite new and in master so that kind of impact would be gigantic.

João



reply via email to

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