Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jul 1999 16:54:58 -0700
From:      John-Mark Gurney <gurney_j@efn.org>
To:        Tim Vanderhoek <vanderh@ecf.utoronto.ca>
Cc:        James Howard <howardjp@wam.umd.edu>, "Daniel C. Sobral" <dcs@newsguy.com>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: replacing grep(1)
Message-ID:  <19990729165458.29326@hydrogen.fircrest.net>
In-Reply-To: <19990729192330.B25978@mad>; from Tim Vanderhoek on Thu, Jul 29, 1999 at 07:23:30PM -0400
References:  <19990729182229.E24296@mad> <Pine.GSO.4.10.9907291856100.11776-100000@rac9.wam.umd.edu> <19990729192330.B25978@mad>

next in thread | previous in thread | raw e-mail | index | archive | help
Tim Vanderhoek scribbled this message on Jul 29:
> On Thu, Jul 29, 1999 at 07:05:57PM -0400, James Howard wrote:
> > 
> > <warning type="Anything said here wrong is my fault, not DES's">
> > 
> > DES tells me he has a new version (0.10) which mmap()s.  It supposedly
> > cuts the run time down significantly, I do not have the numbers in front
> > of me.
> 
> I do.  Still far too slow.  I'll work on this tomorrow, since that
> seems the only way to convince people that mmap is not such a big
> win.  :-(

I just managed to get a five time speed increase by removing an
uncessary copy...   and now, grep spends 50% of it's time in regexc,
37.2% of it's time in mmfgetln, and this is because of the scanning for a
new line character...

> Hmm...  Maybe I'll even turn-out to be wrong.  ;-)  I really believe
> mmap falls into the category of "might be nice, but not necessary and
> does complicate things..."

I think it is a big win...  it shaved off around a half second from
3 seconds down to 2 and a half seconds...

-- 
  John-Mark Gurney                              Voice: +1 541 684 8449
  Cu Networking					  P.O. Box 5693, 97405

  "The soul contains in itself the event that shall presently befall it.
  The event is only the actualizing of its thought." -- Ralph Waldo Emerson


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?19990729165458.29326>