unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Cecil Westerhof <Cecil@decebal.nl>
To: help-gnu-emacs@gnu.org
Subject: Re: Compile regular expression
Date: Mon, 21 Dec 2009 14:03:35 +0100	[thread overview]
Message-ID: <87hbrkbhso.fsf@Traian.DecebalComp> (raw)
In-Reply-To: m28wcwshoi.fsf@gmail.com

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	other threads:[~2009-12-21 13:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-21 10:31 Compile regular expression Cecil Westerhof
2009-12-21 11:14 ` Helmut Eller
2009-12-21 13:03   ` Cecil Westerhof [this message]
2009-12-21 14:27     ` Helmut Eller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87hbrkbhso.fsf@Traian.DecebalComp \
    --to=cecil@decebal.nl \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).