emacs-devel
[Top][All Lists]
Advanced

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

Re: O(N^2) behavior in LOOP


From: Daniel Colascione
Subject: Re: O(N^2) behavior in LOOP
Date: Sat, 29 May 2010 18:06:11 -0400
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4

On 5/29/10 5:56 PM, Daniel Colascione wrote:
> Before I go fix the loop macro, is there a _reason_ for the nconc silliness?

Err, never mind. LOOP has to work that way. An 'into' variable is
visible; code that LOOP knows nothing about can modify it in arbitrary
ways, which would invalidate any cached tail pointer, ruling out that
approach. Also, code that inspects the variable should see a
representation "as it should be", which rules out a temporarily-reversed
representation, ruling out the push and nconc used in the
anonymous-variable case.

I don't see any way to do better than what LOOP does now without some
kind of code-walker. I still want to fix the anonymous-variable case to
use a tail pointer though.

Sorry for the noise.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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