Phobos and LTO

Johan Engelen via Digitalmars-d digitalmars-d at puremagic.com
Sun Mar 5 15:58:41 PST 2017


On Sunday, 5 March 2017 at 21:00:32 UTC, Dmitry Olshansky wrote:
> On 3/5/17 6:17 PM, Las wrote:
>> Is Phobos compiled with LTO enabled?
>
> LTO is *link* time optimization so I'd say it makes no sense 
> for libraries, as they are not linked.

Static libraries _are_ linked into your executable and LTO is 
very relevant for libraries.
Having druntime and/or Phobos compiled with LTO enabled can 
provide massive speedups.
I have not worked on it yet, but it'd be awesome if we could ship 
LDC with LTO versions of druntime and Phobos. PRs with additions 
to our CMake files are very welcome! :-)

cheers,
   Johan



More information about the Digitalmars-d mailing list