Re: [PATCH v2 4/8] Makefile: move ".SUFFIXES" rule to shared.mak

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

 



On Fri, Dec 24, 2021 at 06:37:43PM +0100, Ævar Arnfjörð Bjarmason wrote:
>     $ git -c hyperfine.hook.setup= hyperfine -L rev HEAD~1,HEAD~0 -s 'make -C Documentation man' 'make -C Documentation -j1 man'
>     Benchmark 1: make -C Documentation -j1 man' in 'HEAD~1
>       Time (mean ± σ):     121.7 ms ±   8.8 ms    [User: 105.8 ms, System: 18.6 ms]
>       Range (min … max):   112.8 ms … 148.4 ms    26 runs
>
>     Benchmark 2: make -C Documentation -j1 man' in 'HEAD~0
>       Time (mean ± σ):      97.5 ms ±   8.0 ms    [User: 80.1 ms, System: 20.1 ms]
>       Range (min … max):    89.8 ms … 111.8 ms    32 runs
>
>     Summary
>       'make -C Documentation -j1 man' in 'HEAD~0' ran
>         1.25 ± 0.14 times faster than 'make -C Documentation -j1 man' in 'HEAD~1'

Nice speed-up. Though I am not sure I totally understand where it comes
from ;). Reading 30248886ce8 and the documentation on .SUFFIXES from
[1], I am still unclear. I guess removing the obsolete built-in suffix
rules gives make less work to do in general?

So long as we're not depending on any of these, this seems like a nice
little boost to me.

> diff --git a/shared.mak b/shared.mak
> index 29f0e69ecb9..155ac84f867 100644
> --- a/shared.mak
> +++ b/shared.mak
> @@ -9,6 +9,11 @@
>  %:: s.%
>  %:: SCCS/s.%
>
> +## Likewise delete default $(SUFFIXES). See:
> +##
> +##     info make --index-search=.DELETE_ON_ERROR
> +.SUFFIXES:

Hmm. s/DELETE_ON_ERROR/SUFFIXES? Or perhaps I'm holding this whole thing
incorrectly:

    ~/s/git [nand] (ab/make-noop) $ info make --index-search=.DELETE_ON_ERROR
    no index entries found for '.DELETE_ON_ERROR'
    ~/s/git [nand] (ab/make-noop) $ info make --index-search=.SUFFIXES
    no index entries found for '.SUFFIXES'

Thanks,
Taylor

[1]: https://www.gnu.org/software/make/manual/html_node/Suffix-Rules.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux