Projects / MAWK

MAWK

Mawk (Mike's AWK) is an interpreter for the AWK Programming Language.

Tags
Licenses
Implementation

RSS Recent releases

  •  27 Dec 2013 23:16

Release Notes: Configure script updates to fix some portability issues.

  •  03 Aug 2013 19:51

Release Notes: This release adds checks for too-long literal strings in scripts (this is an old bug from 1.3.3).

  •  10 Dec 2012 02:04

Release Notes: Fixes a problem introduced by the LC_NUMERIC change in 20121129. Fixes several other minor bugs as well.

Release Notes: This release adds several new features for compatibility with gawk and BWK awk, including a length() function for arrays, strftime(), and related functions. It also makes mawk's builtin random number generator optional, permitting use of the system's functions.

Release Notes: This release implements gawk's "nextfile" feature, adds "/dev/stdin" as an alias for stdin (already aliased to "-"), fixes an overflow check used to distinguish between large numbers and strings, improves debugging traces and memory-leak checking, and adds various other bugfixes and portability improvements.

RSS Recent comments

09 Sep 2009 00:02 jmellander

As a regular mawk user, I use it for lots of data slicing & dicing - I noticed that when the hash table become enormous (millions of entries), that the performance is very slow - I surmised that the hash function was having lots of collisions, thus made some changes to a modern hash function while I was trapped in a slow meeting.

In hash.c I replaced the 'hash' function with:

/*
FNV-1 hash function,
per en.wikipedia.org/wiki/...
*/
unsigned
hash(s)
register char *s ;
{
register unsigned h = 2166136261 ;

while (*s) h = (h * 16777619) ^ *s++ ;
return h ;
}

and in array.c replaced 'ahash' with:
/*
FNV-1 hash function,
per en.wikipedia.org/wiki/...
*/
static unsigned ahash(sval)
STRING* sval ;
{
register unsigned h = 2166136261 ;
register char *s = sval->str;

while (*s) h = (h * 16777619) ^ *s++ ;
return h ;
}

Will send benchmark results later, when I run it on an unloaded system.

Screenshot

Project Spotlight

Grenouille

An online service for weather data.

Screenshot

Project Spotlight

SYINF

A portable, cross-platform program for brief system information.