Re: [PATCH 0/7] minmax: reduce compilation time

Lorenzo Stoakes
2024-07-26T18:13:50Z

On Wed, Jul 24, 2024 at 12:52:13PM GMT, Linus Torvalds wrote:
> On Wed, 24 Jul 2024 at 12:35, Lorenzo Stoakes
> <lorenzo.stoakes@oracle.com> wrote:
> >
> > My rough numbers below, on a 32-core intel i9-14900KF box using defconfig +
> > a small number of debug flags I use for compiler development:
>
> Side note: I think better than "time it" would be to simply generate
> all the pre-processor files, and look at the size.
>
> Because to a very close approximation, all the overhead from these
> things comes from the deep macro expansions.
>
> And unlike timings, the pre-processor size is going to be (a) entirely
> repeatable, and (b) will also perhaps point out other worst-case
> scenarios. IOW, maybe there is something else that looks like that
> "min3()" horror, that can be more surgically fixed.
>
> Linus

Agreed, have generated these numbers:

## CONFIG_XEN not set

### Not Reverted

8,413,999,318 bytes

### With Laight's patch series applied

8,237,750,156 bytes (~2.1% improvement)

### Reverted

8,157,201,494 bytes (~3.1% improvement)

## CONFIG_XEN set

### Not Reverted

9,006,361,868 bytes

51,407,944 ./arch/x86/xen/setup.o.pre

### With Laight's patch series applied

8,781,003,140 bytes (~2.5% improvement)

4,819,999 ./arch/x86/xen/setup.o.pre (!)

### Reverted

8,699,892,262 bytes (~3.4% improvement)

5,447,539 ./arch/x86/xen/setup.o.pre