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#63225: Compiling regexp patterns (and REGEXP_CACHE_SIZE in search.c) Date: Mon, 8 May 2023 21:53:42 +0200 Message-ID: <67AAB661-8B27-4D09-BF0D-6B76ABB54477@gmail.com> References: <63882A45-BD02-40D5-92FA-70175267BA3B@acm.org> <874jou7lsf.fsf@localhost> <37EED5F9-F1FE-46B6-B4FA-0B268B945123@gmail.com> <87wn1qqvj0.fsf@localhost> <34F4849A-CB39-4C96-9CC1-11ED723706DA@gmail.com> <87wn1psqny.fsf@localhost> <6DAF37F9-B236-4C33-8E30-0FCA47CCBCC5@gmail.com> <87zg6lfobh.fsf@localhost> <281B22C2-CD69-4495-A97C-E754446CA9A6@gmail.com> <87o7n1v1w3.fsf@localhost> <878E8D66-A548-42E6-B077-6068A8B131D8@gmail.com> <87ednvul22.fsf@localhost> <87y1m1oa01.fsf@localhost> <74CD5EF4-5424-40BA-8F80-D0FD89CB890F@gmail.com> <87zg6fjar6.fsf@localhost> <875y923964.fsf@localhost> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) 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="7601"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63225@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 08 21:54:20 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 1pw6w8-0001nc-3e for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 May 2023 21:54:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pw6vs-0004AZ-Dx; Mon, 08 May 2023 15:54:04 -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 1pw6vr-0004AQ-7p for bug-gnu-emacs@gnu.org; Mon, 08 May 2023 15:54:03 -0400 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 1pw6vq-0005JF-W8 for bug-gnu-emacs@gnu.org; Mon, 08 May 2023 15:54:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pw6vq-0005Nf-EI for bug-gnu-emacs@gnu.org; Mon, 08 May 2023 15:54:02 -0400 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: Mon, 08 May 2023 19:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63225 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 63225-submit@debbugs.gnu.org id=B63225.168357563320660 (code B ref 63225); Mon, 08 May 2023 19:54:02 +0000 Original-Received: (at 63225) by debbugs.gnu.org; 8 May 2023 19:53:53 +0000 Original-Received: from localhost ([127.0.0.1]:41744 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pw6vh-0005NA-IJ for submit@debbugs.gnu.org; Mon, 08 May 2023 15:53:53 -0400 Original-Received: from mail-lf1-f49.google.com ([209.85.167.49]:48390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pw6vd-0005Mt-Sr for 63225@debbugs.gnu.org; Mon, 08 May 2023 15:53:51 -0400 Original-Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-4efe9a98736so5688476e87.1 for <63225@debbugs.gnu.org>; Mon, 08 May 2023 12:53:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683575624; x=1686167624; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=jwdHg4wQ2zODUVs/Mfpom8mL+2A/2JfOj2EK7C1PFvM=; b=mHtx2TYfCWhBw/kVON03Ehy26T6H4+z96dYgteS3CJD0AY3PpnFZQr2GbIs/KaiYFo TrxHNDgrKC9w/ZPQ8IEPhKC+CcsLwwouMCD69HnUf5j0LcGmSTpn9sw8riWNSEsPXFyS 7Dk0iZkAWvwWGgHAYaB/so9iGjkLKkswZK3xLkB/0r556nRV3I4wdvr7J6NEuvBht3IV con0XyZQFb6l2cq1bF6Stc0DsNnBwRmRx7x/yQN17fFCOY7ZxqQkFZ5W2Sn0ZQi1mTwK c7qpb92AbLPdNssuOfcRzR/Nxs80nyzRb51ZuK0VKqi9VGeu04elX1NOC2VBL8MNqS51 pVGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683575624; x=1686167624; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=jwdHg4wQ2zODUVs/Mfpom8mL+2A/2JfOj2EK7C1PFvM=; b=hXg1m43gBW3nvDx8NQL3f6XO6taC5XyJ+3eWCBoVv/7wx0tmOku+rQV9+D+y22oCh2 Pd+eOiOtsMn6Nfslj9eGwhXRzZorTwUqp7X++XzVLuV9p1sQhiq3ssAZUYLPzFmUAVbe c6yES+lk+NJaCjK5GuR+PInkG4iHdLrPgwREIEwItoJSDRBVPbzqM/jCsBSwIO0f8Qzm KtdZ3vFQIa1Qfk19koxUiv6Jv8uokJs82/oypAph9Y4WwDE/Itz/5OY7HZT2D4znaSQ3 HdnFBisxr9KTbOuHxe2oYZU1DKNmLZ8JlLUCBf14yO3/UtVX4wMGXV5EheO70W1x5oGI 6EUQ== X-Gm-Message-State: AC+VfDwYyF0YIR5+kArnieksvkiot4Su0n+bhPVEp0vj0zTPPc6NJTYY re0U1h0gxltQhwMdRdhkIdU= X-Google-Smtp-Source: ACHHUZ7etGlUYBku3iveHfflLNl3erFhZ7mf333BfjGnlta5opFBLHZP+s6sM/U0d5i/Mj+gOv3fhg== X-Received: by 2002:ac2:5d47:0:b0:4eb:341c:ecc5 with SMTP id w7-20020ac25d47000000b004eb341cecc5mr74517lfd.12.1683575623871; Mon, 08 May 2023 12:53:43 -0700 (PDT) Original-Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id b3-20020ac247e3000000b004edb0882ce7sm83482lfp.133.2023.05.08.12.53.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 May 2023 12:53:43 -0700 (PDT) In-Reply-To: <875y923964.fsf@localhost> X-Mailer: Apple Mail (2.3654.120.0.1.15) 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:261365 Archived-At: 8 maj 2023 kl. 21.38 skrev Ihor Radchenko : > Does this imply that simple regexps like >=20 > (looking-at-p (rx (seq bol (zero-or-more (any "\t ")) "#" (or " " = eol)))) >=20 > should better be implemented as the following? Obviously this isn't practical or beneficial for any but the simplest = patterns. Benchmark if you are concerned. It is useful to know when (not) to use regexps. > (I now start thinking that it might be more efficient to create a = bunch > or char tables and step over them to match "regexp", just like any > finite automaton would) I wish elisp were fast enough that we could do that in general. > I really hope that I did not need to do all these workarounds specific = to > current implementation pitfalls of Emacs regexp compiler. Some of them. We program for the system we have. Emacs is a very slowly = moving target. >> I would like that too, but changing that isn't easy. >=20 > I am sure that it is easy. I didn't mean technically. Code is easy to write. > It actually does nothing given that `org-property-re' does not contain > letters. I will remove it. It doesn't even matter what org-property-re contains because it isn't = used with a changed case-fold-search (which is bound using let, not = let*).