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: Wed, 3 May 2023 17:20:52 +0200 Message-ID: <281B22C2-CD69-4495-A97C-E754446CA9A6@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> 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="14372"; 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 Wed May 03 17:22:14 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 1puEJ3-0003Qh-IO for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 May 2023 17:22:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1puEIu-000065-JA; Wed, 03 May 2023 11:22: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 1puEIs-00005v-EC for bug-gnu-emacs@gnu.org; Wed, 03 May 2023 11:22:02 -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 1puEIs-0004gp-54 for bug-gnu-emacs@gnu.org; Wed, 03 May 2023 11:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1puEIr-0007ac-PM for bug-gnu-emacs@gnu.org; Wed, 03 May 2023 11:22:01 -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: Wed, 03 May 2023 15:22:01 +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.168312726229098 (code B ref 63225); Wed, 03 May 2023 15:22:01 +0000 Original-Received: (at 63225) by debbugs.gnu.org; 3 May 2023 15:21:02 +0000 Original-Received: from localhost ([127.0.0.1]:47523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puEHu-0007ZF-Ai for submit@debbugs.gnu.org; Wed, 03 May 2023 11:21:02 -0400 Original-Received: from mail-lf1-f48.google.com ([209.85.167.48]:45190) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puEHs-0007YP-23 for 63225@debbugs.gnu.org; Wed, 03 May 2023 11:21:01 -0400 Original-Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-4ecb137af7eso6201357e87.2 for <63225@debbugs.gnu.org>; Wed, 03 May 2023 08:21:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683127254; x=1685719254; 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=7VOd5xSA5RYxe+f/wPLr4/gb/i8fjUbC9dEkgmQRzaM=; b=m2pmbcFKA0HxqZzQoUrSK5+uN9FyBXaCHWuxPZLW2MlKVasFJokUAA/FlpvZerE8DY rc8ts1adyMAPfq4JwYQvg+6rEfHI8ivis+uKgnpHMkOlZoW6PQMCnCdZ2267r72HLc8T xqpnO48KdCnHaXcWtZzAPaOj4PI5QGZ/nRi9aNEmyRK5OPPqmlyI8me+qbYk6ShSsloB OMraFq+u4xEnnlvF181e8Nja02axF2Wx5eMX+umT8M36LDBXDraJuwiajMFGlAWNv/qO s7EiM4qWPfgU+iBs1iBK6PsVwF2dkAm9Ngusb0gWzIOgmD4+t0Qn2s4RsprveYwRuONq g9+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683127254; x=1685719254; 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=7VOd5xSA5RYxe+f/wPLr4/gb/i8fjUbC9dEkgmQRzaM=; b=ggupMJPzRLxXr81yE6Gm6/igikCKOcHIKsyRjMjgcH+qhZ3HHlzNby0+49vHJscKei 52FdQat3gnOIN5o+dKfY2Y6eCDxM17i0nCWQCQRvw9kf44FUCN6H8QFq0cDCyfaiJK0j 1A61RR7YvWNFW/0SRnw5PrQ2s0mqT+ZYqZl0KE1t4Aw4nBoVSrSfPaQwK6rYP3U6+TfJ DP+Y8tUlHqBQgy3s+H84OL3MDjEMkTMcI9ZmMgphccGuK35AuYlIIhPRc7SydRSsM7zM 5BHLLAI0+H913TLnnRwdGRpf0fm/dontBYNhHoxmo9xJcIQkZq9IheSb1HcK0Os44SrN gQaw== X-Gm-Message-State: AC+VfDwAdhLIsEGD8A1Zsa3FwJ/OTiWGUWmm2pyLz+Dyj8XfbLpkDWw0 h0uj/0EJqWUFZakkjbHOBio= X-Google-Smtp-Source: ACHHUZ47exDnOHzgW9yAG4DTbaZCeaqhmthDpSWry8d7+1vs2KM3Kr9PtT/Cqqzl5srkDA7gCCJ+6Q== X-Received: by 2002:ac2:5dcc:0:b0:4f0:181:5a14 with SMTP id x12-20020ac25dcc000000b004f001815a14mr933959lfq.21.1683127253713; Wed, 03 May 2023 08:20:53 -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 k26-20020ac2457a000000b004f11eb32f20sm1802644lfm.13.2023.05.03.08.20.52 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 May 2023 08:20:53 -0700 (PDT) In-Reply-To: <87zg6lfobh.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:260982 Archived-At: 3 maj 2023 kl. 17.05 skrev Ihor Radchenko : > (cond ((looking-at-p ...) ...)) gives >=20 > misses: 1493570 > hits: 3225203 > % misses from total: 31% >=20 > giant rx + looking-at gives >=20 > misses: 1177242 > hits: 3233553 > % misses from total: 27% Maybe you should instrument the regexp engine and log the pattern and = whether compilation was needed to a file. Run on a reduced dataset, and = see if the sequence of regexps being exercised, and their frequencies, = are consistent with what you expect.