When RAM Matters: Memory Efficiency of AWK Variants
The AWK scripting language emerged from Bell Labs in 1977, named for its creators Alfred Aho, Peter Weinberger, and Brian Kernighan. AWK is still widely used today, as a core tool it is available on a
awklab.com23 min read
Marcus Chen
this is some seriously thorough benchmarking work. the way you isolated each storage pattern and measured the overhead so precisely is impressive. benchmark #4 results are wild. mawk and nawk just completely falling apart on string concatenation while gawk barely breaks a sweat.
the "structure penalty" finding is the kind of thing you only learn from actually measuring it. 5x to 8x more memory just for splitting fields vs storing raw lines. easy to overlook until it blows up in production.
good stuff.