grep, etc
Bob Stockler
bob at trebor.iglou.com
Wed Aug 18 10:27:55 PDT 2004
On Wed, Aug 18, 2004 at 12:42:57PM -0400, Mark Luljak wrote:
| With neither thought nor caution, Bob Stockler blurted:
| > real 0m0.11s
| > user 0m0.06s
| > sys 0m0.01s
| [snip]
| > real 0m0.06s
| > user 0m0.01s
| > sys 0m0.00s
|
| But will that kind of difference hold up over time? Is it being done on a
| completely placid system, or do you have, say...smail running in the
| background, possibly with spamassassin, potentially skewing your CPU
| cycles?
I don't know, and don't intend to find out.
In my tests comparing the various flavors of AWK I compared
three flavors at a time, executing each of them 12 times to
do just one AWK task, from just reading the test file and
doing nothing, to printing each line of the file, splitting
the lines into fields, not splitting them, etc. All output
was redirected to /dev/null.
I threw out the fastest and slowest times and averaged the
rest. Times were the total of usr + sys times.
BTW, as GNU gawk developed (and added some features) it
slowed down. In one test I compared "mawk 1.3.2" with
"gawk 2.15" and "gawk 3.0.2". Here's one example:
# simple assignment of the final field, causing $0 to be split into fields
{ a = $NF }
TIMES: mawk: 1.12 g215: 1.15 g302: 2.09
Bob
PS - I still use that older gawk sometimes because it doesn't
barf at reading directory files.
--
Bob Stockler - bob at trebor.iglou.com
Author: MENU EDIT II - The BEST Creator/Editor/Manager for filePro User Menus.
Fully functional (time-limited) demos available by email request (specify OS).
More information about the Filepro-list
mailing list