From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Davis Herring" Newsgroups: gmane.emacs.devel Subject: Re: Suggestions to remove one alist's members from another Date: Fri, 9 Apr 2010 07:11:46 -0700 (PDT) Message-ID: <54158.130.55.118.19.1270822306.squirrel@webmail.lanl.gov> References: <20100409130204.990F218838C@wsnyder.org> Reply-To: herring@lanl.gov NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1270822333 18561 80.91.229.12 (9 Apr 2010 14:12:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 9 Apr 2010 14:12:13 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Wilson Snyder" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 09 16:12:10 2010 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 1O0EwJ-0005C6-Ac for ged-emacs-devel@m.gmane.org; Fri, 09 Apr 2010 16:12:07 +0200 Original-Received: from localhost ([127.0.0.1]:60319 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O0EwI-0000nn-8j for ged-emacs-devel@m.gmane.org; Fri, 09 Apr 2010 10:12:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O0EwC-0000my-Mi for emacs-devel@gnu.org; Fri, 09 Apr 2010 10:12:00 -0400 Original-Received: from [140.186.70.92] (port=36457 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O0Ew7-0000mE-D5 for emacs-devel@gnu.org; Fri, 09 Apr 2010 10:12:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O0Ew5-0004vi-Ps for emacs-devel@gnu.org; Fri, 09 Apr 2010 10:11:55 -0400 Original-Received: from proofpoint1.lanl.gov ([204.121.3.25]:58439) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O0Ew5-0004vS-GW for emacs-devel@gnu.org; Fri, 09 Apr 2010 10:11:53 -0400 Original-Received: from mailrelay2.lanl.gov (mailrelay2.lanl.gov [128.165.4.103]) by proofpoint1.lanl.gov (8.14.3/8.14.3) with ESMTP id o39EBlZ6032321; Fri, 9 Apr 2010 08:11:47 -0600 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by mailrelay2.lanl.gov (Postfix) with ESMTP id 01E2D163B247; Fri, 9 Apr 2010 08:11:47 -0600 (MDT) X-NIE-2-Virus-Scanner: amavisd-new at mailrelay2.lanl.gov Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay2.lanl.gov (Postfix) with ESMTP id E3B55163AEA9; Fri, 9 Apr 2010 08:11:46 -0600 (MDT) Original-Received: by webmail1.lanl.gov (Postfix, from userid 48) id E1EA71CA8156; Fri, 9 Apr 2010 08:11:46 -0600 (MDT) Original-Received: from 130.55.118.19 (SquirrelMail authenticated user 196434) by webmail.lanl.gov with HTTP; Fri, 9 Apr 2010 07:11:46 -0700 (PDT) In-Reply-To: <20100409130204.990F218838C@wsnyder.org> User-Agent: SquirrelMail/1.4.8-5.el5_4.10.lanl1 X-Priority: 3 (Normal) Importance: Normal X-Proofpoint-Virus-Version: vendor=fsecure engine=1.12.8161:2.4.5, 1.2.40, 4.0.166 definitions=2010-04-09_03:2010-02-06, 2010-04-09, 2010-04-08 signatures=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:123391 Archived-At: > If not, my thought is this: when the list was over some size > I'd determine experimentally, it would instead build a hash > table from in-list and hit the not-alist against that. When > complete it would unfortunately require a second pass > through the in-alist to return it maintaining the original > order. Why not build a hash table (of the cars of the elements) from not-alist instead? Then you can just walk in-alist, skipping elements that are in the hash (that is, whose cars are in it) and adding the rest to out-alist and (their cars to) the hash. Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.