[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
looking-at-p slower than looking-at
From: |
Nicolas Richard |
Subject: |
looking-at-p slower than looking-at |
Date: |
Wed, 25 Nov 2015 14:58:12 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Marcin Borkowski <mbork@mbork.pl> writes:
> You might also (depending on your use-case) want to use looking-at-p,
> which is marginally slower than looking-at, but does not modify match
> data.
Why is it slower and how much slower is it ? I don't see how it can
happen from its implementation:
(defsubst looking-at-p (regexp)
"\
Same as `looking-at' except this function does not change the match data."
(let ((inhibit-changing-match-data t))
(looking-at regexp)))
thanks,
--
Nico.
Re: How to test if the current line contains only white-spache?, Rolf Ade, 2015/11/16