bug-grep
[Top][All Lists]
Advanced

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

bug#50129: closed (Re: bug#50129: -f - option doesn't respond to single


From: Paul Jackson
Subject: bug#50129: closed (Re: bug#50129: -f - option doesn't respond to single EOF from TTY.)
Date: Fri, 20 Aug 2021 13:51:06 -0500
User-agent: Cyrus-JMAP/3.5.0-alpha0-1118-g75eff666e5-fm-20210816.002-g75eff666

I'd guess you're seeing some of the design decisions in stdio,
that were rather "controversial", back around Version 7 Unix,
inside Bell Labs, circa late 1978, when stdio was first introduced.

I've avoided using fread(3S) "forever", even to the point of rolling
my own i/o buffering library, the most recent incarnation of which
can be found at https://github.com/ThePythonicCow/rawscan

The fixed input buffer size of my 'rawscan' probably makes it unsuitable
for most uses such as GNU grep that expect to handle arbitrarily long
input lines.  This 'rawscan' scans over and otherwise ignores the tail end
of any input line that exceeds the line length you specified when opening
the buffer stream.

On a very large test case rather carefully chosen to highlight the
performance of rawscan, it was over twice as fast searching for
a fixed pattern than was grep.  See the "Comparative Performance"
section of rawscan's github page for these results:

https://github.com/ThePythonicCow/rawscan

-- 
                Paul Jackson
                pj@usa.net





reply via email to

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