From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Stephen Berman <stephen.berman@gmx.net>
Cc: emacs-devel@gnu.org
Subject: Re: uniq
Date: Sat, 04 Dec 2010 09:09:03 -0500 [thread overview]
Message-ID: <jwvd3phk4x1.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87ipz9hhab.fsf@escher.home> (Stephen Berman's message of "Sat, 04 Dec 2010 13:08:28 +0100")
> 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
next prev parent reply other threads:[~2010-12-04 14:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-04 2:41 uniq Tak Ota
2010-12-04 12:08 ` uniq Stephen Berman
2010-12-04 14:09 ` Stefan Monnier [this message]
2010-12-05 18:54 ` uniq René Kyllingstad
2010-12-05 19:15 ` uniq Lennart Borgman
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=jwvd3phk4x1.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=stephen.berman@gmx.net \
/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).