In article <[EMAIL PROTECTED]> you write:
>As an aside, I was finding that later versions of GNU Awk were
>outrunning GNU Sed (Well I assume it was GNU sed.)  The authors of the
>Sed and Awk O'Reilly book saw the same behavior, which was a reversal
>of what they saw in the first edition of the book :-).
>
>I wonder who spent so much time speeding up awk and ignoring sed? :)

That would be David Trueman, and me.  The gawk design runs faster than
the original awk, although Mike Brennan's awk is usually faster still.

One reason gawk is faster than sed is the incorporation of the GNU grep
dfa engine for pattern matching operations, falling back to the heavier weight
regex engine only when it's necessary to know the location of the match
(think RS, FS, sub, gsub).

There are other reasons too: careful use of raw I/O for input, lots of
caching, etc.

The code is in K&R style with honest-to-goodness tabs, and IMHO fairly
readable.

Although in my youth I was prey to feeping creaturism, I have tried
harder in recent years to curb the feature spread.  9fans is certainly
an influence there.

BTW, if anyone wishes to (a) get gawk running under Plan 9, and (b) sign
the paperwork, I'll be happy to incorporate the changes.
-- 
Aharon (Arnold) Robbins --- Pioneer Consulting Ltd.     arnold AT skeeve DOT com
P.O. Box 354            Home Phone: +972  8 979-0381    Fax: +1 206 350 8765
Nof Ayalon              Cell Phone: +972 50  729-7545
D.N. Shimshon 99785     ISRAEL

Reply via email to