From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/15211 Path: main.gmane.org!not-for-mail From: Dale Hagglund Newsgroups: gmane.emacs.gnus.general Subject: Re: Regular expression performance in emacs, number of cached regexps Date: 19 May 1998 23:43:02 -0700 Sender: owner-ding@hpc.uh.edu Message-ID: <8667j1bfyh.fsf@ponoka.battleriver.com> References: <199805180529.XAA07067@wijiji.santafe.edu> <86n2cfo9yd.fsf@kramer.bp.aventail.com> <199805190445.WAA09004@wijiji.santafe.edu> NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035154284 20860 80.91.224.250 (20 Oct 2002 22:51:24 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 22:51:24 +0000 (UTC) Cc: wmperry@aventail.com, gsstark@mit.edu, ding@gnus.org, w3-beta@indiana.edu Return-Path: Original-Received: from gwyn.tux.org (gwyn.tux.org [207.96.122.8]) by altair.xemacs.org (8.8.8/8.8.8) with ESMTP id XAA14755 for ; Tue, 19 May 1998 23:52:09 -0700 Original-Received: from sina.hpc.uh.edu (Sina.HPC.UH.EDU [129.7.3.5]) by gwyn.tux.org (8.8.8/8.8.8) with ESMTP id CAA12193 for ; Wed, 20 May 1998 02:49:35 -0400 Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id BAH21951; Wed, 20 May 1998 01:49:31 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 20 May 1998 01:45:44 -0500 (CDT) Original-Received: from claymore.vcinet.com (claymore.vcinet.com [208.205.12.23]) by sina.hpc.uh.edu (8.7.3/8.7.3) with SMTP id BAA21938 for ; Wed, 20 May 1998 01:45:36 -0500 (CDT) Original-Received: (qmail 20478 invoked by uid 504); 20 May 1998 06:45:16 -0000 Original-Received: (qmail 20475 invoked from network); 20 May 1998 06:45:15 -0000 Original-Received: from proxy3.ba.best.com (root@206.184.139.14) by claymore.vcinet.com with SMTP; 20 May 1998 06:45:15 -0000 Original-Received: from best.com (dynamic0.pm01.pleasanton.best.com [204.156.131.0]) by proxy3.ba.best.com (8.8.8/8.8.BEST) with ESMTP id XAA13334; Tue, 19 May 1998 23:43:28 -0700 (PDT) Original-Received: (from rdh@localhost) by best.com (8.8.5/8.8.5) id XAA17415; Tue, 19 May 1998 23:43:02 -0700 (PDT) Original-To: rms@gnu.org In-Reply-To: Richard Stallman's message of "Mon, 18 May 1998 22:45:12 -0600" Original-Lines: 20 X-Mailer: Gnus v5.5/Emacs 19.34 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:15211 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:15211 Maybe adding a new function along the lines of (re-compile REGEXP) that returns a compiled form of REGEXP would be a useful approach. Along with this, all the various regexp search functions could check if they're given a compiled or an uncompiled regexp, and either check the cache and compile if necessary, or just use the given compiled form. This would let authors of regexp-heavy code pre-compile their own regexps, avoiding the entire issue of cache size. The down-side of this is that over-zealous use of this could chew quite a bit of space in compiled regexps. Is there some reason why this sort of approach is a bad idea? I've used emacs extensively for many years, and written a fair amount of lisp code, but I'm only looked at the C internals a few times. Dale.