From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: O(N^2) behavior in LOOP Date: Sun, 30 May 2010 00:14:44 +0200 Message-ID: References: <4C018D79.7040409@censorshipresearch.org> <4C018FD3.1020305@censorshipresearch.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: dough.gmane.org 1275172338 28874 80.91.229.12 (29 May 2010 22:32:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 29 May 2010 22:32:18 +0000 (UTC) Cc: Emacs development discussions To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 30 00:32:17 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OIUZh-0002rE-KH for ged-emacs-devel@m.gmane.org; Sun, 30 May 2010 00:32:17 +0200 Original-Received: from localhost ([127.0.0.1]:53635 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OIUZc-0008F7-UH for ged-emacs-devel@m.gmane.org; Sat, 29 May 2010 18:32:08 -0400 Original-Received: from [140.186.70.92] (port=59659 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OIUZT-0007qM-0A for emacs-devel@gnu.org; Sat, 29 May 2010 18:32:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OIUJ6-0006gI-Ue for emacs-devel@gnu.org; Sat, 29 May 2010 18:15:05 -0400 Original-Received: from mail-yw0-f191.google.com ([209.85.211.191]:60360) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OIUJ6-0006gC-P8 for emacs-devel@gnu.org; Sat, 29 May 2010 18:15:04 -0400 Original-Received: by ywh29 with SMTP id 29so1701612ywh.27 for ; Sat, 29 May 2010 15:15:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=G0rD6fzH2+drJGhe7/Fgwsn/TwGRz5tg+K8G5mp+HcI=; b=joJEz13uQQ0VCSjOEWhKWpHwIqSTMuUCB+D6BY4tClTN9Je5DzE8Os9a8OFrG6mHxs NZluGse34GeDsTgPVf4ptgf7NHZ4ubRKJ3a0sanC0DuZpX7kJQ7/GkeFbDjTQqK5MyrK 5Nndmik+6TBCCS7VQe1TvBYz4XZulO38iiNdQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=wdBJavmZfNqFh7ZSKs53orQ6SX03m/n3YiFQ+4oR2wnI3Zg8cumoNNWlgM0CfqRNu2 PFX78ZzXoS/IQq8ZmIRYgxk2qQGVdr3+KP4p9rzZrVfJiHScnpq1v36elBmTwsblx5CM UHVn9AGWAS69nhKxX/j9idtB5TNFYnKQ+I94w= Original-Received: by 10.100.245.40 with SMTP id s40mr2822007anh.137.1275171304090; Sat, 29 May 2010 15:15:04 -0700 (PDT) Original-Received: by 10.100.44.20 with HTTP; Sat, 29 May 2010 15:14:44 -0700 (PDT) In-Reply-To: <4C018FD3.1020305@censorshipresearch.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:125349 Archived-At: On Sun, May 30, 2010 at 12:06 AM, Daniel Colascione wrote: > 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 Perhaps advice against using it and give alternatives?