From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: uniq Date: Sat, 04 Dec 2010 09:09:03 -0500 Message-ID: References: <20101203.184112.37434497.Takaaki.Ota@am.sony.com> <87ipz9hhab.fsf@escher.home> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1291471766 23905 80.91.229.12 (4 Dec 2010 14:09:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 4 Dec 2010 14:09:26 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stephen Berman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 04 15:09:18 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 1POsnb-0003ly-5f for ged-emacs-devel@m.gmane.org; Sat, 04 Dec 2010 15:09:15 +0100 Original-Received: from localhost ([127.0.0.1]:53060 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POsnZ-0002aD-Ut for ged-emacs-devel@m.gmane.org; Sat, 04 Dec 2010 09:09:13 -0500 Original-Received: from [140.186.70.92] (port=37408 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POsnV-0002Z6-8W for emacs-devel@gnu.org; Sat, 04 Dec 2010 09:09:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POsnU-00005v-5q for emacs-devel@gnu.org; Sat, 04 Dec 2010 09:09:09 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:36285) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1POsnU-00005g-1M for emacs-devel@gnu.org; Sat, 04 Dec 2010 09:09:08 -0500 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id oB4E93no032714; Sat, 4 Dec 2010 09:09:04 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 6F7B5A87A3; Sat, 4 Dec 2010 09:09:03 -0500 (EST) In-Reply-To: <87ipz9hhab.fsf@escher.home> (Stephen Berman's message of "Sat, 04 Dec 2010 13:08:28 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3698=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:133402 Archived-At: > Would it be faster to avoid nested while-loops? Not sure if `member' is faster than `re-search-forward', but if you replace re-search-forward with just search-forward (which requires a bit more care since you need to manually check that matches are anchored at bol and eol) I'm pretty sure that'll be even faster since it will then use a more efficient search algorithm that gets faster the longer the line of text you're looking for. Stefan