[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `looking-back' strange warning
From: |
Michael Heerdegen |
Subject: |
Re: `looking-back' strange warning |
Date: |
Fri, 02 Oct 2015 03:19:03 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> You can pass (point-min) for the limit if that's what you want.
> Making it optional Encourages people to think that looking-at is just
> like looking-back, with the same performance characteristic, whereas
> making it mandatory encourages people to put a reasonable limit and
> hence avoid pathological behavior at the end of large buffers.
My two cents: Even if you specify an optimal limit, `looking-back' can
still be unnecessarily slow. For example,
(looking-back "xy" 2)
is much slower than
(and (> (point) 2)
(save-excursion
(goto-char (- (point) 2))
(looking-at "xy")))
where "xy" stands for any plain string.
Michael.
- RE: `looking-back' strange warning, (continued)
RE: `looking-back' strange warning, Drew Adams, 2015/10/08
- Re: `looking-back' strange warning, Dmitry Gutov, 2015/10/08
- Re: `looking-back' strange warning, Andreas Röhler, 2015/10/08
- Re: `looking-back' strange warning, Dmitry Gutov, 2015/10/08
- Re: `looking-back' strange warning, Andreas Röhler, 2015/10/08
- Re: `looking-back' strange warning, Stefan Monnier, 2015/10/08
- Re: `looking-back' strange warning,
Michael Heerdegen <=
- Re: `looking-back' strange warning, Michael Heerdegen, 2015/10/08
- RE: `looking-back' strange warning, Drew Adams, 2015/10/08
- RE: `looking-back' strange warning, Drew Adams, 2015/10/08
- Re: `looking-back' strange warning, Tassilo Horn, 2015/10/08
- RE: `looking-back' strange warning, Drew Adams, 2015/10/08
- Re: `looking-back' strange warning, Tassilo Horn, 2015/10/08
- RE: `looking-back' strange warning, Drew Adams, 2015/10/08
- Re: `looking-back' strange warning, Andreas Röhler, 2015/10/08
- RE: `looking-back' strange warning, Drew Adams, 2015/10/08
RE: `looking-back' strange warning, Drew Adams, 2015/10/08