help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compile regular expression


From: Cecil Westerhof
Subject: Re: Compile regular expression
Date: Mon, 21 Dec 2009 14:03:35 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)

Helmut Eller <eller.helmut@gmail.com> writes:

>> I am working with CL at the moment. When you compile a regular
>> expression in CL, the program is about 4 times as fast. This program is
>> a translation of something I first wrote in elisp. So I was wondering if
>> I could get the same advantage in my elisp code. But I could find
>> nothing to compile a regular expression. Is this true, or am I not
>> looking correctly?
>
> Emacs uses a cache for compiled regexps internally but it's not exposed.

Okay, then in principle I do not have to worry. But one more question. I
call a function a lot (five million times) with a string containing the
regular expression. Does the cache work in this case also? Because the
string is evaluated in the function and looses focus when returning.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof


reply via email to

[Prev in Thread] Current Thread [Next in Thread]