From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#47711: bug#48841: bug#47711: bug#48841: bug#47711: [PATCH VERSION 2] Add new `completion-filter-completions` API and deferred highlighting Date: Fri, 27 Oct 2023 01:14:45 +0100 Message-ID: References: <3d3f894f-a6fa-53ae-5d50-c3aa9bffc73e@daniel-mendler.de> <56ab18b1-4348-9b2c-85bb-af9b76cd429a@daniel-mendler.de> <328f87eb-6474-1442-e1ca-9ae8deb2a84a@yandex.ru> <83fsvcbio7.fsf@gnu.org> <9f432d18-e70f-54c1-0173-1899fb66d176@gutov.dev> <877cnafv39.fsf@gmail.com> <9447dde3-b8e7-2ec0-9a9c-72c4cf9d12a8@gutov.dev> 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="27786"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Daniel Mendler , Eli Zaretskii , Stefan Monnier , 47711@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 27 02:12:56 2023 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 1qwAT6-00071w-Li for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 27 Oct 2023 02:12:52 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qwASn-0001na-Dy; Thu, 26 Oct 2023 20:12:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qwASl-0001n6-Ku for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 20:12:31 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qwASl-0007AL-Ct for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 20:12:31 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qwATG-0002zi-Ch for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 20:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Oct 2023 00:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47711 X-GNU-PR-Package: emacs Original-Received: via spool by 47711-submit@debbugs.gnu.org id=B47711.169836555611467 (code B ref 47711); Fri, 27 Oct 2023 00:13:02 +0000 Original-Received: (at 47711) by debbugs.gnu.org; 27 Oct 2023 00:12:36 +0000 Original-Received: from localhost ([127.0.0.1]:34717 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qwASp-0002yt-VU for submit@debbugs.gnu.org; Thu, 26 Oct 2023 20:12:36 -0400 Original-Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]:49334) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qwASn-0002yP-B7 for 47711@debbugs.gnu.org; Thu, 26 Oct 2023 20:12:34 -0400 Original-Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-5079f9675c6so2346218e87.2 for <47711@debbugs.gnu.org>; Thu, 26 Oct 2023 17:12:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698365516; x=1698970316; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=BzVrKqNAPvvqpX8ztcoc33GsTE11idx+mOgyNMgHYvU=; b=hqe0qzFgH9jfTWCy60VlPc5y+Z0NeJ2r5Z3QIEL/4tvjPSAs6DjgQv9KoTd4to8JWm XTjgjOfQaf8qcU5eE2k8/z4uEVPJFib6eyFCy9G/JXx2VgZlZIXKkfNJJkltzt+vEAxT f0TRujmnLE2CFwiOsonVPiKd+whmCd1nCp6dF5G5y1ZskhVGM+pLKBNbNvugS2EV046/ M0hcT20d73NTdK97vqokW98ypFpPmZshbZnP2fbJfCg8JQgdkGPsXUm84QR2uB4JBE2U dB/jZujx8g/A2TYsjwIsodYTbThCJqqsReLX+tlgtOhi8+w0yU8CPivbA54EXaw31BC6 HdSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698365516; x=1698970316; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BzVrKqNAPvvqpX8ztcoc33GsTE11idx+mOgyNMgHYvU=; b=iqF9Zq7RFw3fTZlP0SV3E2nAClTQULYmEJoTiBXTcQme5XyreFmsRqcZ4h42Hq3olg a9DQU7t994ZpgmsORV18Kc7P146HX/R0Mp5KckRoyvPDj3Ec4D2nkMfvNKV3byPvfaKh aWcYR4O01ppQWt2i+l0peHsQFuY9Z6zIKkluM+1s2SbfDxss/ILCaLh7wVzXNnbkNxzS 9471JSobZV0Ly3uNTDt1JC6g+s79yjW+En1gXHqZi9Lb2IBua9Q7JeHvyayPR+WzGHPY c4x+lsdnft3HuDurjPwRSv8Gepec0LXwGAVCGJ5bn/URcsB1xdtBT3s9Iyzq4XmdZZHc W6jQ== X-Gm-Message-State: AOJu0YxPpfVn+z21V6yGWzr+TAmaZQQ0qbdLj4sWfJXh3XYcrSyYht7g 5QHISquHxHwO+ASyOWCNtpO//Rr+D7d3VPRtGGs= X-Google-Smtp-Source: AGHT+IGSw68FJ+5lK809Lje7jL72GPCY5js2fdgX9osjH98igIUjw0h5WrwFslR6JE+odWfmXjhW7SOoajXSQhlbybE= X-Received: by 2002:a05:6512:124f:b0:500:7fc1:414b with SMTP id fb15-20020a056512124f00b005007fc1414bmr706286lfb.25.1698365515957; Thu, 26 Oct 2023 17:11:55 -0700 (PDT) In-Reply-To: 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:273329 Archived-At: On Fri, Oct 27, 2023 at 12:44=E2=80=AFAM Jo=C3=A3o T=C3=A1vora wrote: > > It is slower in the sorting step, though: mostly due to the extra > > consing created with the alist to-be-sorted, I guess, but also because > > of the repeated string-match call (which, while fast and much faster > > than the match-data call, is still not free). > > And is the sorting step not included in the full call to > completion-filter-completions? I don't fully understand how it works. I get it now. Neither completion-sorted-completions or completion-all-completions do the sorting. It's just that if sorting is bound to be required, completion-all-completions will do most of the work upfront, and thus sorting will be much faster in that case, compensating completely. So now I don't think that micro-benchmark is of much use. A useful such benchmark would have to be representative of the full cycle. Maybe we don't even need this benchmark, given the instrumentation in icomplete.el works well and seems precise and deterministic (just not as convenient to run). Jo=C3=A3o