Mawk (Mike's AWK) is an interpreter for the AWK Programming Language.
| Tags | Software Development Interpreters |
|---|---|
| Licenses | GPLv2 |
| Implementation | Awk |
Recent releases


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.


Release Notes: Bugfixes for the interface to the system regular expression library and new RPM and Debian package scripts.


Release Notes: A regression in the "delete" operation was fixed. Strict compiler warnings were cleaned up for 64-bit platforms.
Recent comments
09 Sep 2009 00:02
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.