Link time optimization in D

Leandro Lucarella llucax at gmail.com
Tue Jun 1 16:13:05 PDT 2010


Don, el  1 de junio a las 20:15 me escribiste:
> Michiel Helvensteijn wrote:
> >Adam Ruppe wrote:
> >
> >>>You save time by recompiling only files that have changes.
> >>But, then the whole program goes through the process again anyway to
> >>perform the optimization. You save a little time in skipping parts of
> >>the front end for unchanged file, but the whole backend process has to
> >>happen anyway.
> >
> >That `backend' process is not the compilation process all over again. It's
> >not even the optimizer phase all over again. It's just the extra
> >optimizations that could not be performed on a file-by-file basis.
> >
> >Or at least it should be.
> 
> It really needs to be able to perform inlining, and that means it's
> still a fair chunk of the optimiser. It's true that link-time
> optimisation means that much of the front-end compilation can be
> skipped, which is a huge fraction of the total time in C++.
> (Certainly you can skip the parsing step completely). But it's a
> much smaller fraction of the total time in D. So it isn't the big
> win for D that it is for C++.

LTO is not only targeted at C++. I don't have numbers to talk seriously
about how a big gain is for C though, which might be closer to D in
terms of parse time compared with the whole compilation process. Even
more, you can do LTO for object files generated from different
languages.

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
En la calle me crucé con un señor muy correcto, que habitualmente anda en
Falcon; iba corriendo con dos valijas en la mano y dijo: "Voy para Miami,
tiene algún mensaje o ..." y le dije: "No, no, no..."
	-- Extra Tato (1983, Triunfo de Alfonsín)


More information about the Digitalmars-d mailing list