From: Kenichi Handa <handa@m17n.org>
Cc: bug-gnu-emacs@gnu.org
Subject: Re: skip-chars-forward v. re-search-forward
Date: Thu, 1 May 2003 16:11:00 +0900 (JST) [thread overview]
Message-ID: <200305010711.QAA14948@etlken.m17n.org> (raw)
In-Reply-To: <E199FUs-0003kd-00@fencepost.gnu.org> (message from Richard Stallman on Fri, 25 Apr 2003 22:33:02 -0400)
In article <E199FUs-0003kd-00@fencepost.gnu.org>, Richard Stallman <rms@gnu.org> writes:
> 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").
That is what I did in my benchmark test.
(search-forward "%")
vs (skip-chars-forward "^%")
vs (re-search-forward "[%]")
> 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.
Yes, I know that. I was surprised because search-forward
was twice faster even if the search string size is one.
---
Ken'ichi HANDA
handa@m17n.org
next prev parent reply other threads:[~2003-05-01 7:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-02 17:43 skip-chars-forward v. re-search-forward Dave Love
2003-04-02 19:49 ` Andreas Schwab
2003-04-03 22:53 ` Richard Stallman
2003-04-04 10:48 ` Dave Love
2003-04-03 10:37 ` Richard Stallman
2003-04-04 10:52 ` Dave Love
2003-04-24 1:41 ` Kenichi Handa
2003-04-26 2:33 ` Richard Stallman
2003-04-29 17:20 ` Dave Love
2003-05-01 7:11 ` Kenichi Handa [this message]
2003-05-02 7:05 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200305010711.QAA14948@etlken.m17n.org \
--to=handa@m17n.org \
--cc=bug-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).