emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master 1392ec7 2/3: A quicker check for quit


From: Paul Eggert
Subject: Re: [Emacs-diffs] master 1392ec7 2/3: A quicker check for quit
Date: Wed, 1 Feb 2017 16:01:52 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0

On 01/26/2017 05:40 AM, Stefan Monnier wrote:
for circular lists a better solution is to use the hare&tortoise, e.g. with 
FOR_EACH_TAIL.
OK, after installing the patches that I circulated earlier, I submitted bug reports containing two draft patches to use hare&tortoise and FOR_EACH_TAIL instead of maybe_quit, when possible.

The patch in Bug#25605 improves FOR_EACH_TAIL to fix its FIXMEs and to switch to Brent's teleporting-tortoise algorithm, which is faster than Floyd's plodding tortoise.

The patch in Bug#25606 changes functions like 'length' and 'member' so that they use FOR_EACH_TAIL to signal loop cycles, rather than wait for the user to type C-g. Alternatively, functions like 'member' could simply return nil when they discover a cycle; however, in practice I think it's probably better to signal.



reply via email to

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