[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Compiling Elisp to a native code with a GCC plugin
From: |
Lars Magne Ingebrigtsen |
Subject: |
Re: Compiling Elisp to a native code with a GCC plugin |
Date: |
Wed, 15 Sep 2010 17:51:17 +0200 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
>> So you end up with
>> (or (looking-at "foo ") (search-forward "\nfoo "))
>> which creates a regexp, anyway, and seems clumsy.
>
> Unless the text you match is short, the above is probably the fastest, indeed.
> There is no built-in support for the above idiom, OTOH, so you have to
> pay for the extra Elisp interpretation overhead of calling looking-at
> and then search-forward.
looking-at probably compiles the regexp, so there might be unnecessary
overhead there. (The regexp compilation and caching and stuff.)
Is there any function like
(is-the-string-following-point-equal-to-this-string-p "foo ")
in Emacs that I've overlooked somehow?
--
(domestic pets only, the antidote for overdose, milk.)
address@hidden * Lars Magne Ingebrigtsen
- Re: Compiling Elisp to a native code with a GCC plugin, (continued)
- Re: Compiling Elisp to a native code with a GCC plugin, Wojciech Meyer, 2010/09/15
- Re: Compiling Elisp to a native code with a GCC plugin, Stefan Monnier, 2010/09/15
- Re: Compiling Elisp to a native code with a GCC plugin, Helmut Eller, 2010/09/15
- Re: Compiling Elisp to a native code with a GCC plugin, Stefan Monnier, 2010/09/15
- Re: Compiling Elisp to a native code with a GCC plugin, Lars Magne Ingebrigtsen, 2010/09/15
- Re: Compiling Elisp to a native code with a GCC plugin, Andreas Schwab, 2010/09/15
- Re: Compiling Elisp to a native code with a GCC plugin, Lars Magne Ingebrigtsen, 2010/09/15
- Re: Compiling Elisp to a native code with a GCC plugin, Andreas Schwab, 2010/09/15
- Re: Compiling Elisp to a native code with a GCC plugin, Lars Magne Ingebrigtsen, 2010/09/16
- Re: Compiling Elisp to a native code with a GCC plugin, Stefan Monnier, 2010/09/15
- Re: Compiling Elisp to a native code with a GCC plugin,
Lars Magne Ingebrigtsen <=
- Re: Compiling Elisp to a native code with a GCC plugin, Leo, 2010/09/15
- Re: Compiling Elisp to a native code with a GCC plugin, Lars Magne Ingebrigtsen, 2010/09/15
- Re: Compiling Elisp to a native code with a GCC plugin, David Kastrup, 2010/09/15
- Re: Compiling Elisp to a native code with a GCC plugin, Leo, 2010/09/15
- Re: Compiling Elisp to a native code with a GCC plugin, David Kastrup, 2010/09/15
- Re: Compiling Elisp to a native code with a GCC plugin, Lars Magne Ingebrigtsen, 2010/09/16
- Re: Compiling Elisp to a native code with a GCC plugin, Andreas Schwab, 2010/09/16
- Re: Compiling Elisp to a native code with a GCC plugin, Lars Magne Ingebrigtsen, 2010/09/16
- Re: Compiling Elisp to a native code with a GCC plugin, Eli Zaretskii, 2010/09/17
- Re: Compiling Elisp to a native code with a GCC plugin, Lars Magne Ingebrigtsen, 2010/09/17