automake-ng
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Automake-NG] [PATCH 00/11] Several changes to parallel-tests suppor


From: Akim Demaille
Subject: Re: [Automake-NG] [PATCH 00/11] Several changes to parallel-tests support
Date: Fri, 11 May 2012 09:15:42 +0200

Le 10 mai 2012 à 16:32, Stefano Lattarini a écrit :

>> On 05/09/2012 06:03 PM, Akim Demaille wrote:
>> 
>> Deeply nested Make macros can be extremely costly, especially
>> because they are not lazy, this is really call by name: when used
>> several times, they are evaluated several times.  There must be
>> some good reason for this, but then result is longer compilation,
>> which is _bad_.
>> 
>> So I think you should at least try to make some measurements.
>> 
> Ouch, you were quite right :-(

Any idea how Quagmire behaved on this regard?  Was performance
taken into account?

> Then again, if I modify the assignments of the am__test_logs, am__test_bases
> and am__test_results variables to be immediate-evaluation assignments (i.e.,
> defined with ":=" rather than "="), the performance becomes on-par with that
> before the series -- in some cases, actually *better*:

There's a catch 22 here.  Regular macros are costless when not
called, and (IMHO) gratuitously costly when used, because they
don't implement memoization.  On the other hand, := macros are
most efficient at runtime, but always evaluated, so they
induce another style of fat.

> ====================================================================
> AFTER the series has been applied, with immediate-evaluation tweak
> ====================================================================
> 
> $ make all                                      # 12 times
> 2.5 seconds
> 
> $ make recheck                                  # 1 time
> 1.8 seconds
> 
> $ make recheck TESTS='1 2 3 4 5 6 7 8 9'        # 6 times
> 2.0 seconds
> 
> $ make check AM_LAZY_CHECK=yes                  # 1 time
> 4 seconds

If you manage to have this behave predictably, then I would favor
this.  But it is really tricky.  IMHO, Make is really to blame.
Maybe you should try to see if one cannot implement memoization
by hand?  Have selected =-macros rewrite themselves to their
result when evaluated.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]