News for hackers. Stuff that matters.
Re:GCC 4.9.0 released by azakai on Tuesday April 22, 2014 @12:53PM (#7628782)
It's on LTO (link time optimization), which was previously not much optimized for compilation speed. Most projects probably don't need LTO so this won't matter for them, but for projects like Firefox that do, faster LTO compilation is a great thing.
Re:GCC 4.9.0 released by riffraff on Tuesday April 22, 2014 @01:15PM (#7628922)
not being an expert of such things, could you explain to me why do you think most projects don't need LTO ? (I'm interpreting that as "won't gain much", rather than "will find optimizations unnecessary")
Re:GCC 4.9.0 released by azakai on Tuesday April 22, 2014 @05:37PM (#7630633)
In my experience things like PGO and LTO matter most in very large projects. Of course it depends on the codebase, but in general that's what I've seen.

In very large projects, fully optimizing all the code is often unneeded, and bad because fully optimized code is larger (inlining, unrolled loops, etc.). PGO lets you find what actually needs to be optimized, and you can keep the rest compact to improve load times. Vice versa, PGO can tell you what code is run immediately on load so you can order it so that happens faster, etc.

Similarly, LTO is most useful in large projects where it is not obvious to the compiler how to optimize across compilation unit boundaries - as in a small enough project, either there are few such boundaries or it is easy to manually optimize for them.

Re:GCC 4.9.0 released by joosters on Tuesday April 22, 2014 @02:14PM (#7629338)
"Most projects don't need LTO" is just opinion (to be fair, no-one needs LTO but it may still help many people)

Larger projects could stand to gain more from LTO because the code will likely be spread across many more files. As a result, the compiler is only seeing a very small percentage of the code when it compiles each file. Potentially then, the compiler is missing out more optimisations.

Re:GCC 4.9.0 released by kzrdude on Tuesday April 22, 2014 @06:59PM (#7631029)
You could already have profiled & inlined performance critical code. With LTO, maybe you wouldn't have had to do that manually.