From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] add compiled regexp primitive lisp object Date: Wed, 07 Aug 2024 14:43:17 +0200 Message-ID: <875xscec62.fsf@gmail.com> References: <87mslxxddk.fsf@protonmail.com> <5He97LtsyeyQoTLU7d91oP2CLO8s_2afdgcNxozsFjzu8qGbB_7nXmsZL5O6Ej7K-tuEmngCcPKJpDAjxeKz4jk1DvqSUbdOLpw5U1vo1SY=@hypnicjerk.ai> <87le1avopk.fsf@protonmail.com> <2LOLmIp1X8w4CGbqq3qDrzmKVA0KzYNL1N9lBtWdB-MtEv9oCuYgJMYprG170wMPjYxeQImAmWOPatGTTl4KxZMlptNo9A9hnHt84vdN9EA=@hypnicjerk.ai> <87ttfxtszi.fsf@protonmail.com> <86r0b1o5sr.fsf@gnu.org> <868qx8o83w.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7381"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Danny McClanahan , pipcet@protonmail.com, emacs-devel@gnu.org, mattiase@acm.org, acorallo@gnu.org, monnier@iro.umontreal.ca, stefankangas@gmail.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 07 14:44:14 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 1sbg1V-0001ny-6D for ged-emacs-devel@m.gmane-mx.org; Wed, 07 Aug 2024 14:44:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbg0p-0008Jl-85; Wed, 07 Aug 2024 08:43:31 -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 1sbg0j-0008AH-85 for emacs-devel@gnu.org; Wed, 07 Aug 2024 08:43:25 -0400 Original-Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sbg0g-0005Ol-JD; Wed, 07 Aug 2024 08:43:23 -0400 Original-Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2ef2c56da6cso19083251fa.1; Wed, 07 Aug 2024 05:43:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723034599; x=1723639399; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=F2+qh1BrXRPme00KRTGU+Exe6b7Rk/7FMAdQHO0+W1E=; b=TjAmyJ2H3X2tijJbIVab4OPRAYvUCkp+IMJc1Um/UJZjYvIWt1xishJKjJcW9mQx0z 1r5LFiE6QZKNi+IMEY06W962e88i4454jYdoi6YF9MVf0l8Pa0lX+w0zdUD1t25yXeEA xKjgIpj6KcXwky/UqXQMI3eSKpd0LLIgvWHbKx2roBFewM26pIxhIq9Rj/oIlG0C38+c 6aWGgVGEf6z8oqKqzot4VpQu5HfPv1Ob41fMSmuXfH+yBXzqjRpmpud/cN9rqzQ+2Hl/ j/3XizhRJlab9EwVsNpycnKu34StH49cmn9oMJ4A5AYEAOpwCZpBmgcey9uQL3raocE2 31kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723034599; x=1723639399; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=F2+qh1BrXRPme00KRTGU+Exe6b7Rk/7FMAdQHO0+W1E=; b=HvPpaY3268Bnc5dRjsYIK3VooIcFI8IUBBpfr6chnC8iysjHkWfM87FTcVsmoj0muA 13t3Csjx8Al/+UgLfkOkkSqMmO0b9sMRH6AxnT2oC9hJN+VRjSAP4fKEh0u5V+X3BcwU 91M1FYap+BWntl6mC7X9P7vdUKWHwYtrNkVPHiHFrXyXrzWKxAXxWeyHNIJXXUu2PydR axFDbObxdPNlpQnBef8qZQjPhm8wPI0gdiRAzFNdOyA0YMSIkLbBbGKuD8TgamY+iVWC Z4+7N8Lv2ms3Pzafgny+ohCexDNCsQ7prKnLH7bNZerbZ5TFWTYDATIuCaKp5u7XzDsP 8bHA== X-Forwarded-Encrypted: i=1; AJvYcCX0LUIO+cNqXJIWFiNjgWidg2jpCB4ZnsKSI2cdopGDrnRR9yUWOoJLVz2aHBTJdZ/tX9U6bDHzKEkn/KASGfIWzMe6xqgbPNYDwZdJu9CCv6EDtQDs X-Gm-Message-State: AOJu0Yz4etPvuX1cGv2dF9veCJb8qtdyuJq0Op2XJ5obPEmIGWtxHHzu pwKA9NRliFaC2g1TgKNPij5TYFzaHi8xP3kBRFad55+Gm7sSXP2i X-Google-Smtp-Source: AGHT+IF1osKNR7Uqfc1Kli9RXNaxC6xsbFPn4z7P80uEHWxk2FSqgCTbs8uV+9OImRTJY9s0bp9Xdg== X-Received: by 2002:a05:6512:220d:b0:52e:8141:1b2b with SMTP id 2adb3069b0e04-530bb6c7fc0mr11232345e87.57.1723034598813; Wed, 07 Aug 2024 05:43:18 -0700 (PDT) Original-Received: from caladan (dial-181089.pool.broadband44.net. [212.46.181.89]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7dc9bc4219sm635486266b.30.2024.08.07.05.43.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Aug 2024 05:43:18 -0700 (PDT) In-Reply-To: <868qx8o83w.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 07 Aug 2024 15:00:51 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::22d; envelope-from=eller.helmut@gmail.com; helo=mail-lj1-x22d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:322504 Archived-At: On Wed, Aug 07 2024, Eli Zaretskii wrote: [...] > So these are two (or maybe even one) advantages, mainly in the > convenience area. My counter-argument would be that the long history > of using the current regexps in Emacs means that these advantages are > relatively minor. I'm not sure they justify adding new objects into > Emacs Lisp, with all its baggage. But maybe others will disagree with > me. > > Are there other advantages? An advantage of regex objects is that they don't require the regexp cache. The regex cache is relatively small (20 entries) and e.g. in the *scratch* buffer, the font lock regexps are recompiled on every keystroke because the cache doesn't have enough capacity. Interestingly, this seems to have very little performance impact. Of course, one could make the cache bigger, but for things like font lock, pre-compiled regexps seem like a good solution.