From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 20 Mar 2006 21:50:50 +0200 From: Aharon Robbins Subject: Re: [9fans] ports from GPL In-reply-to: <3e1162e60603190643y169561detb46ccbf0e11be30e@mail.gmail.com> To: 9fans@cse.psu.edu Cc: Message-id: <200603201950.k2KJooD8006941@skeeve.com> Content-transfer-encoding: 7BIT References: <810c885907de9253706fc61fd641101d@collyer.net> Topicbox-Message-UUID: 1a797176-ead1-11e9-9d60-3106f5b1d025 In article <3e1162e60603190643y169561detb46ccbf0e11be30e@mail.gmail.com> 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