[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: skip-chars-forward v. re-search-forward

From: Andreas Schwab
Subject: Re: skip-chars-forward v. re-search-forward
Date: Wed, 02 Apr 2003 21:49:23 +0200
User-agent: Gnus/5.090017 (Oort Gnus v0.17) Emacs/21.3.50 (gnu/linux)

Dave Love <d.love@dl.ac.uk> writes:

|> I've tended to use skip-chars-forward instead of re-search-forward
|> since it's byte-coded and I assumed it's more efficient.  However, I
|> made a measurement and found that skip-chars-forward was actually
|> slower than re-search-forward.

Both skip-chars-forward and re-search-forward are builtin functions.  But
re-search-forward uses a cache for recently used regexps to avoid the
overhead of compiling it, whereas skip-chars-forward always sets up the
search map anew.


Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 N├╝rnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

reply via email to

[Prev in Thread] Current Thread [Next in Thread]