Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Jul 1999 17:00:41 -0400 (EDT)
From:      Todd Vierling <tv@pobox.com>
To:        Jamie Howard <howardjp@wam.umd.edu>
Cc:        freebsd-hackers@freebsd.org, tech-userlevel@netbsd.org, tech@openbsd.org
Subject:   Re: Repalcement for grep(1)
Message-ID:  <Pine.NEB.4.10.9907031655240.9156-100000@server.duh.org>
In-Reply-To: <Pine.GSO.4.10.9907031513150.17705-100000@rac9.wam.umd.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 3 Jul 1999, Jamie Howard wrote:

: I also do not use mmap(), I treat the file as a simple stream
: instead.  My code is also a bit slower on larger files, but a bit faster
: on smaller files.  Sometimes I am an order of magnitude slower.  I am
: never that much faster.  I think not using mmap is the reason, but I do
: not know for certain.

After the unified buffer cache modifications happen in the NetBSD kernel,
the difference will be much less noticeable.

: Now, I am having a problem though.  I cannot figure out how to implement
: -w and -x.  For -x, I tried modifying the regular expression (foo) into
: ^(foo)$ before compiling, but that did not work.  I intended to do
: something similar with -w.  Anyway, I am probably missing the obvious, but
: does anyone have any ideas regarding how I should implement -w and -x?

Hm.  Adding ^ and $ should work, provided you don't specify either
REG_NOTBOL or REG_NOTEOL.  (I assume that (foo) above, including the parens,
is the RE.  With the parens, it depends whether you're using standard REs or
extended REs.  :)

Thatnks for this work ... I'll leave it to another soul to do something with
it in NetBSD.

-- 
-- Todd Vierling (tv@pobox.com)



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?Pine.NEB.4.10.9907031655240.9156-100000>