tests/wrapper.as is a wrapper script that enables the test suite to
run Autoconf’s command line tools (autoconf, autoheader, etc.) without
having installed them first. It’s written in m4sh. All of the
programs it wraps are written in Perl. Therefore, we can make the
wrapper more efficient by rewriting it in Perl and having it invoke
the real program with the ‘do’ builtin. This cuts out the cost of
starting up a shell and crunching through m4sh initialization (order
of 400 lines of code). Using ‘do’ means we only have to start up Perl
once.
‘make check TESTSUITEFLAGS="-j24"’ speeds up a small but consistently
measurable amount on my workstation. The wall-clock time difference
would be bigger at lower levels of parallelism.
before:
wall 1m16.716s
user 16m44.847s
sys 12m6.452s