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

Linus Torvalds
2024-07-30T04:10:31Z

On Sat, 27 Jul 2024 at 09:26, Linus Torvalds
<torvalds@linuxfoundation.org> wrote:
>
> Longest line is drivers/.../ia_css_ynr.host.c:71 (27785kB)

So that 27MB shrank to 23MB and then to "only" 1.4MB with the patches
that are now in mainline.

Now with the patch I just posted at

https://lore.kernel.org/all/CAHk-=wgRDupSBzUX_N_Qo_eaYyDfOH=VTihhikN36cGxCc+jvg@mail.gmail.com/

that nasty line expands to "just" 82kB, and the file builds quickly.

Still not exactly small, but hey, two and a half orders of magnitude isn't bad.

And yes, that one driver is disgusting and Lorenzo had a nice patch to
change some macros to inline functions which just made the whole
problem go away, but as a test-case for horrid macro expansion of
min()/max() it was lovely.

Of course, I never did any build timings. I'm not sure how much it
actually shows up on that level. A couple of bad cases won't be *that*
noticeable when most cases aren't too horrid.

Linus