From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Danny McClanahan Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] add compiled regexp primitive lisp object Date: Tue, 26 Nov 2024 18:05:35 +0000 Message-ID: References: <2LOLmIp1X8w4CGbqq3qDrzmKVA0KzYNL1N9lBtWdB-MtEv9oCuYgJMYprG170wMPjYxeQImAmWOPatGTTl4KxZMlptNo9A9hnHt84vdN9EA=@hypnicjerk.ai> <87ttfxtszi.fsf@protonmail.com> <86r0b1o5sr.fsf@gnu.org> <868qx8o83w.fsf@gnu.org> <875xscec62.fsf@gmail.com> <87o764sb6y.fsf@gmail.com> 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="10239"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Augusto Stoffel , Helmut Eller , Eli Zaretskii , Danny McClanahan , pipcet@protonmail.com, emacs-devel@gnu.org, mattiase@acm.org, acorallo@gnu.org, stefankangas@gmail.com To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 26 19:35:51 2024 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 1tG0Pf-0002Vg-8w for ged-emacs-devel@m.gmane-mx.org; Tue, 26 Nov 2024 19:35:51 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tG0Ot-0001Td-I9; Tue, 26 Nov 2024 13:35:03 -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 1tFzwh-0001CS-D8 for emacs-devel@gnu.org; Tue, 26 Nov 2024 13:05:55 -0500 Original-Received: from mail-0301.mail-europe.com ([188.165.51.139]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFzwc-0006lp-9r; Tue, 26 Nov 2024 13:05:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hypnicjerk.ai; s=protonmail3; t=1732644340; x=1732903540; bh=nIkLH7NjCjWjIrbL1gChu17wLQn9f0Pqqm0Bcl6JXW0=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=e5jvewcrXnkZgVgujR1jqvgTprGVVWovLFd2Q25f1VaZWo+g8DNr6j0BW4OQYrrq6 sabqKdhQ+ipHRMqcp9v5QC2liD1H4wcI1gzy0me5DNC6PsUB75hgRNsAJnTId97uBf FmCkQs0PYAkDR0FSkhxdyjcDCfKx6RPfz8VFvCTsekMJYzTFYB2P1bEDbIjR1L3w2O KT88XUtOv/se4WXOP0j5vJkJS1blaTm+2AeRR9WM5+foV3htIiMYrvKr6dq6gfl82G wlxH0lCmsewccnVFjFIxYgoqDAXIZX8dQmLcXqyl2cBXDe9H+5Az4PMVUnpJGn+pu9 QTAwar00raZmg== In-Reply-To: Feedback-ID: 27837847:user:proton X-Pm-Message-ID: ed0204147892e2d0e1c5c3d1177d11f5d3471d96 Received-SPF: pass client-ip=188.165.51.139; envelope-from=dmcc2@hypnicjerk.ai; helo=mail-0301.mail-europe.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 26 Nov 2024 13:34:58 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:325719 Archived-At: Thanks so much for this thorough and thoughtful response! I am compiling a = 20-minute recorded talk for the upcoming EmacsConf regarding these discussi= ons and investigations. I am also now waiting for a response from graduate = school, during which I hope to then have more time to pin down several of t= he threads raised by this discussion. This has all been immensely helpful and I really appreciate how responsive = emacs-devel has been in elaborating much of the packed-together assumptions= I was making. On Tuesday, August 13th, 2024 at 21:32, Stefan Monnier wrote: >=20 >=20 > > Ignoring the issue that regexps may be syntax-table dependent and other >=20 > > complications (issues which also would need to be addressed in the > > proposed approach), what would be the advantage of exposing compiled > > regexp objects versus having an infinite regexp cache? >=20 >=20 > I can think of the following: >=20 > - Not having to pay as much attention to the engineering of the cache > (it's currently small because the lookup could become costly, with > the current implementation). >=20 > - We could offer to spend a fair bit more time optimizing the compiled > code (e.g. removing backtracking). >=20 > But there's always the question of whether it's worth the complexity. > IOW, what are the concrete use cases where it makes > a measurable difference. >=20 >=20 > Stefan