[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: strstr
On Sun, Oct 07, 2001 at 12:12:14AM -0400, Glenn Maynard wrote:
> On Sat, Oct 06, 2001 at 07:21:03PM +0100, Markus Kuhn wrote:
> > Please substantiate any claims about performance by actually making a
> > realistic measurement, not a guess. Most such guesses are naive on modern
> > processor architectures, which typically are RAM bound for searches, not
> > CPU bound.
>
> It comes out about the same; the decoding logic offsets the gain of doing
> less compares. It pulls ahead of raw strstr with a simple optimization
> of removing an unnecessary inner loop conditional (about 10% on my system),
> so it's not quite RAM-bound.
>
> I hadn't looked at decoding logic much; a big reason this ends up faster
well, then measure (has anyone, recently? -- all I see is assertions).
--
Thomas E. Dickey <dickey@xxxxxxxxxxxxxxxxxxxx>
http://invisible-island.net
ftp://invisible-island.net
-
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/linux-utf8/