From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.bugs Subject: Re: skip-chars-forward v. re-search-forward Date: Fri, 25 Apr 2003 22:33:02 -0400 Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <200304240141.KAA05156@etlken.m17n.org> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1051324496 23546 80.91.224.249 (26 Apr 2003 02:34:56 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 26 Apr 2003 02:34:56 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 26 04:34:54 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 199FWg-00067e-00 for ; Sat, 26 Apr 2003 04:34:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 199FX5-0000l4-04 for gnu-bug-gnu-emacs@m.gmane.org; Fri, 25 Apr 2003 22:35:19 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 199FVv-00084x-00 for bug-gnu-emacs@gnu.org; Fri, 25 Apr 2003 22:34:07 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 199FVp-0007u2-00 for bug-gnu-emacs@gnu.org; Fri, 25 Apr 2003 22:34:02 -0400 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 199FUs-0006yu-00 for bug-gnu-emacs@gnu.org; Fri, 25 Apr 2003 22:33:02 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.10) id 199FUs-0003kd-00; Fri, 25 Apr 2003 22:33:02 -0400 Original-To: Kenichi Handa In-reply-to: <200304240141.KAA05156@etlken.m17n.org> (message from Kenichi Handa on Thu, 24 Apr 2003 10:41:33 +0900 (JST)) Original-cc: d.love@dl.ac.uk X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:4891 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:4891 It's still surprising that search-forward/backward is more than twice faster. I have no idea what kind of magic the boyer-moore search is using. The comparison between search-forward and skip-chars-forward does not seem meaningful to me, because they do different jobs. The only case which both of these functions can do is (search-forward "a") and (skip-chars-forward "^a"). The time taken by search-forward is inversely proportional to the search string size in favorable cases, so if you tried a longer string, it was probably faster.