Stefano Lattarini wrote:
> On 09/08/2012 03:29 PM, Jim Meyering wrote:
>>
>> But, ... surprise! So far there is *no* improvement, and in fact a small
>> penalty in this very worst case:
>>
> My wild guess is that the culprit for this might be the Automake-generated
> recursive make invocation in the handling of $(BUILT_SOURCES):
>
> all: $(BUILT_SOURCES)
> $(MAKE) $(AM_MAKEFLAGS) all-am
>
> What happens if, after the first build, you substitute the rule above in
> your Makefile with simply:
>
> all: all-am
>
> ? Is there any improvement?
Hi Stefano,
Good call! Yes:
>> Going from ~1.73 elapsed to 1.97 is a penalty of 15%.
Here's a representative number for 3-4 trials:
5.44user 2.55system 0:01.23elapsed 645%CPU (0avgtext+0avgdata
14140maxresident)k
0inputs+3984outputs (0major+1019738minor)pagefaults 0swaps
So now, instead of hurting performance, that Makefile improves it by 23%
>> An even less-flattering (but less realistic) case is the "nothing to do"
>> build, where the elapsed time goes from 0.83s to 1.03s. That's a 25%
>> performance hit.
And in this case ("nothing to do" build), the result is even better:
old: 0.83s
new: 0.32s
That's more than 60% faster.