emacs-devel
[Top][All Lists]
Advanced

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

Re: Compiling Elisp to a native code with a GCC plugin


From: Stefan Monnier
Subject: Re: Compiling Elisp to a native code with a GCC plugin
Date: Wed, 15 Sep 2010 16:07:32 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>> As I recall, in my profiles, the GC and the regexp matcher were more
>> costly the bytecode interpreter (though of course this is
>> workload-dependent).
> Regarding regexp matcher, do you know if performance will be improved by
> using pcre?

Using a different regexp-engine might be a good idea.
But there are two issues:
- Emacs needs to be able to match on buffer text rather than only on
  strings.  Buffer text is made of 2 chunks of utf-8 byte arrays, so the
  regexp engine needs to be able to handle a whole in the middle of
  its input.
- The main problem with Emacs regexps right now is that they have
  pathological cases where the match-time is enormous (potentially
  exponential explosion in the size of the input string).  To be
  worthwhile a replacement should address this problem, which basically
  needs it should not be based on backtracking.

IIUC pcre suffers from the same 2nd problem, which in my book makes it
a poor candidate for replacement.


        Stefan



reply via email to

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