From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: complexity in minibuffer Date: Wed, 2 Jun 2021 19:30:20 +0100 Message-ID: References: <871r9laj6a.fsf@gmail.com> <1b73a130-204c-76fb-2b60-02b814aee0f0@daniel-mendler.de> <87r1hl8xom.fsf@gmail.com> <878s3t8tzw.fsf@gmail.com> <3c68bd00-70ca-fa18-f9b8-cd03029f9294@daniel-mendler.de> <8735u18lsd.fsf@gmail.com> <8e33bbfe-0015-b85c-b57c-ba448f2e6215@yandex.ru> <3d519805-f602-fa52-ec69-0506bb6cb568@yandex.ru> <45be3e2f-82f6-087c-bfd8-5926a395d198@yandex.ru> <5c1b585b-688e-2e5a-ea01-e32ecb70f034@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17588"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Daniel Mendler , Juri Linkov , Stefan Monnier , "emacs-devel@gnu.org" To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jun 02 20:31:41 2021 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 1loVeW-0004MX-P4 for ged-emacs-devel@m.gmane-mx.org; Wed, 02 Jun 2021 20:31:40 +0200 Original-Received: from localhost ([::1]:60318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1loVeV-0000D4-Nx for ged-emacs-devel@m.gmane-mx.org; Wed, 02 Jun 2021 14:31:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56944) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loVda-0007T7-Jv for emacs-devel@gnu.org; Wed, 02 Jun 2021 14:30:42 -0400 Original-Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]:43912) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1loVdR-0008UZ-EX for emacs-devel@gnu.org; Wed, 02 Jun 2021 14:30:42 -0400 Original-Received: by mail-pl1-x630.google.com with SMTP id v12so1538344plo.10 for ; Wed, 02 Jun 2021 11:30:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=eOl/1vykhczdHhj8zNdAsoG5cgWzW78HTXbRxmpMFNw=; b=sWAKdMmu6p8GjSmVZ8BLT3ugtK//zwtWH0qejMMRTS1uWDDN5GgwNiveHY90vdR66p CTZF6uNb99ofieIMDD0F0dx9kaEAlRd/Kd5tnlhiZSJBABWzmcrNU20hDpP+2yOxqLcG uo7+z8PFO3tbVrQJA2t1fdBG5fnF6CTvvJmrZz5rd1bO7X3GOaSiKw9rFnT08tq9WAbt Z2p5WnfKu3dQ97PxIlaNXUAzprMKqepOUDXrqPR42i5m1MwoYpU8QF0en5DLbN0Zm5E8 7t+PgtrztTRKXWoHpslfnww7p65Cw/rjuP/uQolPChbRT0bgRxRXVy3m3tNaOw1KAN/t 6oDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=eOl/1vykhczdHhj8zNdAsoG5cgWzW78HTXbRxmpMFNw=; b=c1Q9S8pIMwR3UQhmNHG+VvhcyAEduoiSbeFbi8+c6uJidK8BJuXZDTm/TzCovOmBDX miZJAnMuYjLh2FSI3B+zQss1G6unWKLjOQHDi3IQit8aV9zpl4xx7XJpyK27luQxS7hw 0W/2P8LT42ppEnT0XQoH4Phv/C1Ukz1IlDdmRtynOhixIMW1Z9sAL+/PTBpHjoO7FeXc rkLG2QK6rfFJgKFMH3+wLj8a1bzSUb1ZLHjhlqiszCANjecNATdClN5lDQW+umjGkY64 4O2JNAMYUZ3sbur2ETZ27SzHjVGvMaS7aOH51e+z8H0wJlMVMHhWh547kmGrnG0U2uuM umYQ== X-Gm-Message-State: AOAM5307HoYErNgu8kUG+xMjq3Z0a2VeN4iv1hcExLMfAOSoSHJTfpAA dIYgW/aav4qZUOADpNyT6XVZGONP+MEGJLYLZoI= X-Google-Smtp-Source: ABdhPJzfqsLPqYT9uCsLnx4voeP6CvvMX1VOQM3lM+VSsLESt7GGhuwHmexcFNuphJzlHsB8jjIprNjTdq9hnhXQ2+Y= X-Received: by 2002:a17:90a:1141:: with SMTP id d1mr32274864pje.56.1622658631984; Wed, 02 Jun 2021 11:30:31 -0700 (PDT) In-Reply-To: <5c1b585b-688e-2e5a-ea01-e32ecb70f034@yandex.ru> Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=joaotavora@gmail.com; helo=mail-pl1-x630.google.com 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_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:270318 Archived-At: On Wed, Jun 2, 2021 at 7:11 PM Dmitry Gutov 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=C3=A3o