Projects / MAWK

MAWK

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

Tags
Licenses
Implementation

RSS Recent releases

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.

Release Notes: Parsing of the -W option was modified to make it more useful in the #-line of scripts. A port to OpenSolaris was made. There were many fixes and improvements for built-in regular expressions.

Release Notes: This consolidates changes in the last set of releases, porting those to a variety of new platforms (vendor Unix, Cygwin, and MinGW). Several changes are made to the floating point configure and runtime to achieve this.

Release Notes: This release supports nulls in the field-separator pattern. It improves the performance of associative arrays via a new hashing function. It has other fixes/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

MOEA Framework

A Java framework for multiobjective optimization.

Screenshot

Project Spotlight

QScintilla

A port of Scintilla to Qt.