From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/15213 Path: main.gmane.org!not-for-mail From: wmperry@aventail.com (William M. Perry) Newsgroups: gmane.emacs.gnus.general Subject: Re: Regular expression performance in emacs, number of cached regexps Date: 20 May 1998 06:47:27 -0500 Sender: owner-ding@hpc.uh.edu Message-ID: <86af8dxiy8.fsf@kramer.bp.aventail.com> References: <199805180529.XAA07067@wijiji.santafe.edu> <86n2cfo9yd.fsf@kramer.bp.aventail.com> <199805190445.WAA09004@wijiji.santafe.edu> <8667j1bfyh.fsf@ponoka.battleriver.com> Reply-To: wmperry@aventail.com NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.108) Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1035154285 20869 80.91.224.250 (20 Oct 2002 22:51:25 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 22:51:25 +0000 (UTC) Cc: rms@gnu.org, 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 EAA16445 for ; Wed, 20 May 1998 04:54:00 -0700 Original-Received: from sina.hpc.uh.edu (root@Sina.HPC.UH.EDU [129.7.3.5]) by gwyn.tux.org (8.8.8/8.8.8) with ESMTP id HAA26002 for ; Wed, 20 May 1998 07:51:22 -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 GAH25358; Wed, 20 May 1998 06:51:16 -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 06:47:46 -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 GAA25345 for ; Wed, 20 May 1998 06:47:37 -0500 (CDT) Original-Received: (qmail 21777 invoked by uid 504); 20 May 1998 11:47:17 -0000 Original-Received: (qmail 21774 invoked from network); 20 May 1998 11:47:15 -0000 Original-Received: from vinb15.cntwk.net (HELO slow.in.aventail.com) (207.205.120.157) by claymore.vcinet.com with SMTP; 20 May 1998 11:47:15 -0000 Original-Received: from kramer.bp.aventail.com (kramer.bp.aventail.com [192.168.2.2]) by slow.in.aventail.com (8.8.5/8.8.5) with ESMTP id DAA00451; Wed, 20 May 1998 03:47:41 -0700 Original-Received: (from wmperry@localhost) by kramer.bp.aventail.com (8.8.5/8.8.5) id GAA00463; Wed, 20 May 1998 06:47:27 -0500 Original-To: Dale Hagglund X-Face: O~Rn;(l][/-o1sALg4A@xpE:9-"'IR[%;,,!m7 writes: > 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. This is actually something that is on my todo list, but I have zero free time right now due to my mother's illness, so its been on the back burner for a while. -bill p.