Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Jul 1999 16:27:57 +0900
From:      "Daniel C. Sobral" <dcs@newsguy.com>
To:        John-Mark Gurney <gurney_j@resnet.uoregon.edu>
Cc:        Dag-Erling Smorgrav <des@flood.ping.uio.no>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: replacing grep(1)
Message-ID:  <37A2A57D.9BE13D3A@newsguy.com>
References:  <19990729182229.E24296@mad> <Pine.GSO.4.10.9907291856100.11776-100000@rac9.wam.umd.edu> <19990729164533.36798@hydrogen.fircrest.net> <xzpyafy1d53.fsf@flood.ping.uio.no> <xzpwvvi1czq.fsf@flood.ping.uio.no> <37A1BD1A.59DF842E@newsguy.com> <19990730102726.34286@hydrogen.fircrest.net>

next in thread | previous in thread | raw e-mail | index | archive | help
John-Mark Gurney wrote:
> 
> right now, I'm trying to think of a way to eliminate the fgetln searching
> for end of line... of course this would eliminate some of the simplicity
> of design, but we can get a BIG speed increase if we simply don't scan for
> the new line unless we NEED to...  and if we do, why not use regexec to
> search for us?

As Dillon said, the decrease in speed of the scan might not be that
great. On the other hand, a decent pattern matching algorithm *does
not* examine every character (which is why GNU grep performs so much
better with bigger patterns).

--
Daniel C. Sobral			(8-DCS)
dcs@newsguy.com
dcs@freebsd.org

	- Jordan, God, what's the difference?
	- God doesn't belong to the -core.




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?37A2A57D.9BE13D3A>