From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#58950: [PATCH] * lisp/subr.el (buffer-match-p): Optimise performance Date: Sat, 7 Jan 2023 13:57:14 +0100 Message-ID: <34AFCB0F-5F53-4033-BCDF-1B3001285169@acm.org> References: <875yfyebi0.fsf@posteo.net> <87a6331xts.fsf@posteo.net> <1119f0ff-aacf-b41e-e7f7-b0a00132b35f@yandex.ru> <255D9E93-422C-4A43-9876-751FDB8E61DB@acm.org> <73923B98-E4B8-44F8-9445-2FD05564ADA0@acm.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16518"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Philip Kaludercic , 58950@debbugs.gnu.org, Stefan Monnier To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 07 13:58:32 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 1pE8mO-00047G-Iu for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Jan 2023 13:58:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pE8lw-0007zP-6n; Sat, 07 Jan 2023 07:58:04 -0500 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 1pE8lu-0007yq-NK for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2023 07:58:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pE8lu-0004Xi-FE for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2023 07:58:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pE8lu-00018T-7j for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2023 07:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Jan 2023 12:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58950 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 58950-submit@debbugs.gnu.org id=B58950.16730962444319 (code B ref 58950); Sat, 07 Jan 2023 12:58:02 +0000 Original-Received: (at 58950) by debbugs.gnu.org; 7 Jan 2023 12:57:24 +0000 Original-Received: from localhost ([127.0.0.1]:56681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pE8lH-00017a-Mb for submit@debbugs.gnu.org; Sat, 07 Jan 2023 07:57:23 -0500 Original-Received: from mail171c50.megamailservers.eu ([91.136.10.181]:53528 helo=mail92c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pE8lE-00017O-Ex for 58950@debbugs.gnu.org; Sat, 07 Jan 2023 07:57:21 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1673096238; bh=wGBRP73RnPwR2xN2hQWHIt84WTH4VfvLTrfiE9F6xCk=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=JTVtOf8e8sgc4hx8mXeBL4uBOaLTw66iaNgO/ou+pHqmrl4Deem+l5FUnrg6gWgfj yWRMZvZYWCMg+39S4LNL77fXDfdoX2q1FNrC0sq+tmDNLkM53Kx+0T5CLUH9aQ70aG /9AUmOTl9koneZKo3Zr0cs/y/Wm5AjHTpy9GG2yI= Feedback-ID: mattiase@acm.or Original-Received: from smtpclient.apple (c188-150-171-209.bredband.tele2.se [188.150.171.209]) (authenticated bits=0) by mail92c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 307CvFbZ007268; Sat, 7 Jan 2023 12:57:16 +0000 In-Reply-To: X-Mailer: Apple Mail (2.3654.120.0.1.13) X-CTCH-RefID: str=0001.0A742F16.63B96C2E.0006, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-Origin-Country: SE 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:252797 Archived-At: 6 jan. 2023 kl. 22.41 skrev Dmitry Gutov : >> (I wish we had (byte-)compiled elisp functions carrying their own = source, either as s-exp, string of formatted source text, or source file = reference -- that would allow for sensible editing in Customise without = performance penalty. But Santa gave me a wool jumper instead, that's = nice too.) >=20 > We kind of have that already, if we just made the type for be 'sexp', = or a Lisp form. With all the freedom associated with it, just lower = performance compared to a compiled function. That's short in two respects: performance, and non-retention of = formatting and comments. We could store source refs in: - a hash table weakly keyed on the code object - some back corner of byte-code objects - OClosures We have a similar problem with regexps, which are only retained and = edited in the traditional syntax. We are veering off-topic. Sorry about that. > I'm on the fence regarding changing it, though, for compatibility and = ergonomical reasons (it's easier for the user to avoid typing a dot). Is compatibility a serious concern given that buffer-match-p is new in = 29?