On 11.01.2022 15:05, Ed Morton wrote:
> Have you found much of a speed improvement after compiling the C version
> of the scripts that awkcc outputs? When I worked at AT&T in the 90s we
> used fairly large (1,000+ lines) awk scripts with nawk for some C code
> generation from a domain-specific language and tried using awkcc to let
> us compile our awk scripts to speed up the build process but didn't
> notice a difference.
This observation astonishes me, I'd have expected at least *some*
speed up for a compiled version, yet more so for the not too fast
Nawk. - Is the generated code so bad?
Around 1999 there was the Awka Awk-compiler, and on it's web page[*]
they have some performance data - not standard test cases, rather
just measuring the runtime of Awk features - and that compiler works
quite efficient, especially if compared to nawk (which incidentally
was one of the tools used for comparison[**]).
[*] Still accessible: http://awka.sourceforge.net/compare.html
[**] The used tools don't reflect the current tools' performance;
at that time Gawk (for example) didn't use byte code, so current
Gawk probably competes better than depicted in the these numbers.