Re: [dev] off topic - awk versions performance comparison

From: Kris Maglione <maglione.k_AT_gmail.com>
Date: Sat, 14 Aug 2010 19:53:17 -0400

On Sat, Aug 14, 2010 at 10:38:32PM +0200, Uriel wrote:
>On Sat, Aug 14, 2010 at 12:07 PM, Kris Maglione <maglione.k_AT_gmail.com> wrote:
>> nawk is one-true-awk from FreeBSD. I find the results strange, namely
>> because Plan 9's awk is also one-true-awk. It also produces reasonable
>> results with "^y" instead of "y", while gawk doesn't. I know that nawk uses
>> a combination NFA/DFA, but I see that Plan 9's awk instead pre-process the
>> expression and uses Plan 9's pure-NFA engine. My guess is that, because
>> they're greedy algorithms, they both traverse the entire string looking for
>> a possibly longer match, but my understanding of Plan 9's altorithm was
>> otherwise.
>
>I think one of the very few differences between Plan 9's awk and bwk's
>awk is UTF-8 support, not sure why that would make a difference, but I
>thought they were mostly identical otherwise.

That's mostly true, but awk is still actively developed, and has
had a lot of changes in the 11 years since it was last synced
with Plan 9. It also uses an entirely different regular
expression engine.

-- 
Kris Maglione
The easy confidence with which I know another man's religion is folly
teaches me to suspect that my own is also.
	--Mark Twain
Received on Sun Aug 15 2010 - 01:53:17 CEST

This archive was generated by hypermail 2.2.0 : Sun Aug 15 2010 - 02:00:03 CEST