[Top][All Lists]

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

Re: Compilation speed

From: Arthur Miller
Subject: Re: Compilation speed
Date: Mon, 10 Aug 2020 16:33:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> A nice thing about new, shiny machines with a bunch of cores is that it
> makes saying "make bootstrap" faster when I want to check stuff.
> However, there's a couple of sections that are single-threaded, which
> makes the machine mostly idle while building, and I wondered whether
> anybody has looked into these things...
> I did a bootstrap (with make -j8) and timestamped the lines to see
> whether anything in particular stands out.
> [larsi@stories ~/src/emacs/trunk]$ emake bootstrap 2>&1 | ts -s
> 00:00:00 rm -f libXMenu11.a ./*.o deps/*
> ...
> First deleting a lot of stuff...  that's fine...
> 00:00:03 running CONFIG_SHELL=/bin/bash /bin/bash ./configure --no-create 
> --no-recursion
> 00:00:03 checking for xcrun... no
> 00:00:03 checking for GNU Make... make
> [...]
> 00:00:22 config.status: executing etc-refcards-emacsver.tex commands
> But I've also long wondered whether anybody has actually pruned the
> tests lately?  Are all those tests (for things that seem really trivial,
> mostly) really necessary these days?

I have wondered this for years when I am compiling/recompiling (mostly
GNU) software. I think configure is great for configuring options, but I
also wonder if it needs to check for all that C compiler portability.
Since Emacs requires C99 compiler (as I understand) couldn't configure
script just check for avialability of C99 standard, OS and compiler and
assume the headers, flags and certain functions are avialable?In essence
it already does this, but also checks for all kind of stuff that nowdays
is standard (like stdlib.h, string.h etc).

First checks on my system are those:

00:00:00 checking for GNU Make... make
00:00:00 checking build system type... x86_64-pc-linux-gnu
00:00:00 checking host system type... x86_64-pc-linux-gnu
00:00:00 checking for gcc... gcc

So if configure already detected GCC does it really need to check for
all those -fno-common and rest of the flags afterwards; couldn't it be
assumed 'yes' to all those automatically? As well that we have stdint.h,
limits.h and OS stuff sys/*.h, malloc, dirent, etc. I am not so
knowledgable about autotools, but if there is for example not strnlen
function avialable, would it be copied/added to system to by autotools
or would it just bail out and says it can't create executable?

For me it takes about 18 seconds to do all those tests, and 1 second to create
makefiles, so it would be cool if configure script could skipp some of
those tests.

> And then ./configure takes 19 seconds, and that's fully single-threaded,
> I believe?  And...  I'm guessing there's no way to get that to be
> multi-threaded?

As I read in autotools, lots of those tests will actually create small
application, compile it, run it and record the result? Or do I
missunderstand? Couldn't autotools devs, make those tests run in their
own shell as asynchronous processes, write output to a file and then
make a finall pass over all outputs and then decide to bail out/continue
or take an action. I guess won't happen, just a rambling.

reply via email to

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