emacs-devel
[Top][All Lists]
Advanced

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

Re: convert regex.c, strftime.c mktime.c to standard C


From: Lars Magne Ingebrigtsen
Subject: Re: convert regex.c, strftime.c mktime.c to standard C
Date: Mon, 22 Nov 2010 17:45:11 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

Richard Stallman <address@hidden> writes:

> Most editing is localized.  With a large buffer, it would be a big
> inefficiency to move the gap far away for each search, then move it back
> to change the buffer.

Yes, it would most likely be a performance hit, but it might not be
prohibitive.

If the typical use case is

(while (re-search-forward "foo" nil t)
  (insert "bar"))

or something, and the `re-search-forward' moved the gap to before point,
it's not obvious (at least not to me :-) how big the performance hit
would be, since the `insert' most likely moves the gap, anyway.

(And only the first `re-search-forward' would move the gap, since after
moving it to before point, no further gap moves would be necessary.)

If the new, gapless regex code is much faster than the old, gap-aware
regex code, then this might be a net win.  Or not.

-- 
(domestic pets only, the antidote for overdose, milk.)
  address@hidden * Lars Magne Ingebrigtsen



reply via email to

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