From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: What is the difference between looking-at and an anchored search? Date: Thu, 17 Jul 2008 21:52:11 +0900 Message-ID: References: <487F2985.9080103@gmail.com> Reply-To: Miles Bader NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1216299161 11932 80.91.229.12 (17 Jul 2008 12:52:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Jul 2008 12:52:41 +0000 (UTC) Cc: Emacs Devel To: "Lennart Borgman" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 17 14:53:26 2008 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.50) id 1KJSz0-0000st-DL for ged-emacs-devel@m.gmane.org; Thu, 17 Jul 2008 14:53:18 +0200 Original-Received: from localhost ([127.0.0.1]:44276 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KJSy7-0007wO-OO for ged-emacs-devel@m.gmane.org; Thu, 17 Jul 2008 08:52:23 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KJSy3-0007u4-E2 for emacs-devel@gnu.org; Thu, 17 Jul 2008 08:52:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KJSy2-0007tC-Vt for emacs-devel@gnu.org; Thu, 17 Jul 2008 08:52:19 -0400 Original-Received: from [199.232.76.173] (port=44892 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KJSy2-0007t2-TW for emacs-devel@gnu.org; Thu, 17 Jul 2008 08:52:18 -0400 Original-Received: from tyo201.gate.nec.co.jp ([202.32.8.193]:48669) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KJSxy-0001zq-Gr; Thu, 17 Jul 2008 08:52:15 -0400 Original-Received: from relay31.aps.necel.com ([10.29.19.54]) by tyo201.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id m6HCq7bH014067; Thu, 17 Jul 2008 21:52:11 +0900 (JST) Original-Received: from relay21.aps.necel.com ([10.29.19.20] [10.29.19.20]) by relay31.aps.necel.com with ESMTP; Thu, 17 Jul 2008 21:52:11 +0900 Original-Received: from dhapc248.dev.necel.com ([10.114.112.215] [10.114.112.215]) by relay21.aps.necel.com with ESMTP; Thu, 17 Jul 2008 21:52:11 +0900 Original-Received: by dhapc248.dev.necel.com (Postfix, from userid 31295) id 68E27400; Thu, 17 Jul 2008 21:52:11 +0900 (JST) System-Type: i686-pc-linux-gnu Blat: Foop In-Reply-To: (Lennart Borgman's message of "Thu, 17 Jul 2008 14:42:04 +0200") Original-Lines: 26 X-detected-kernel: by monty-python.gnu.org: Solaris 8 (1) 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:100886 Archived-At: "Lennart Borgman" writes: >> > Yes, that is one possibility. But then perhaps I would assume that >> > re-search-forward better might optimize that search since it can >> > (in theory) cut off the searching at BOUND. In the case I am >> > looking at performance is important. >> >> Why don't you time it? > > Because I thought someone here knew more about the performance differences > (if any). I am also a bit surprised that looking-at does not have a BOUND > parameter and hoped to get some comments on that. Offhand it doesn't fit looking-at's interface particulary well -- while you can come up with semantics for such a parameter, they're not something obviously useful as is the case for searches. Also, for typical uses of looking-at, the performance difference isn't a factor. Anyway, it seems a lot better to get actual data than pontificate... premature optimization is the root of all evil, after all... :-) -miles -- Monday, n. In Christian countries, the day after the baseball game.