Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: GCC 4.7 Link-Time Optimization Performance

  1. #1
    Join Date
    Jan 2007
    Posts
    14,561

    Default GCC 4.7 Link-Time Optimization Performance

    Phoronix: GCC 4.7 Link-Time Optimization Performance

    With the recent interest regarding Link-Time Optimization support within the Linux kernel by GCC, here are some benchmarks of the latest stable release of GCC (v4.7.1) when benchmarking several common open-source projects with and without the performance-enhancing LTO compiler support.

    http://www.phoronix.com/vr.php?view=17785

  2. #2
    Join Date
    Jan 2008
    Location
    South Africa
    Posts
    228

    Default

    The GCC developers always mention building Firefox with LTO now uses less ram, etc.

    But, what differences are there with large and complicated software like Firefox?

  3. #3
    Join Date
    Jul 2009
    Posts
    221

    Default

    PHP takes three times as long to compile? Someone made a bad assumption there, or else something's wrong.

    But I thought the kernel generally had pretty low CPU usage anyway (I guess the BYTE benchmark being an exception). I'm unsure as to why big speed ups in general software usage would be expected from optimisations the compiler can do to the kernel.

  4. #4
    Join Date
    Feb 2012
    Posts
    70

    Default some PGO benchmarks

    Along with LTO, i am interested in seeing some PGO benchmarks.

  5. #5
    Join Date
    Aug 2011
    Posts
    27

    Default

    Quote Originally Posted by Cyborg16 View Post
    PHP takes three times as long to compile? Someone made a bad assumption there, or else something's wrong.

    But I thought the kernel generally had pretty low CPU usage anyway (I guess the BYTE benchmark being an exception). I'm unsure as to why big speed ups in general software usage would be expected from optimisations the compiler can do to the kernel.
    Where did you get the kernel stuff from? The test is about using -lto compile flag on application performance (and compile time).



    I wish the apache benchmark had more infomration. Although it may be good enough for relative performance gain it says very lilttle.
    On one of my machines I got from 5000req/s to 26000req/s on 6KB file by using different options like keepalive and concurrecncy level.

    Moreover there is lettle lto can do if apache uses dynamic modules. All the hooks and codepaths still need to be there in case a module needs them.
    It would be more interesting to benchmark apache compiled with static-modules option.

  6. #6
    Join Date
    Jul 2009
    Posts
    221

    Default

    Quote Originally Posted by orome View Post
    Where did you get the kernel stuff from? The test is about using -lto compile flag on application performance (and compile time).
    Ah. Speed-reading and noticing the first link in the article. Thanks for pointing out my mistake!

  7. #7

    Default

    Quote Originally Posted by mayankleoboy1 View Post
    Along with LTO, i am interested in seeing some PGO benchmarks.
    PGO is trickier. for any given app that you want to compile with PGO then you must write a script that runs the program with some representative task, in order to make a profile. If the profile tasks are not representative you may end up optimising the wrong paths.

  8. #8
    Join Date
    Jan 2012
    Posts
    151

    Default

    I could be wrong, but...

    If you are going to be using LTO, I don't think you are suppose to care about how long it takes to compile. Of course it's going to take longer because you are optimizing the code on a global rather than local scale. If you use LTO, you are already saying you care more about the speed of the binary rather than how long it takes to compile. It is good to know the compile time hit that LTO takes, but I don't think it's really that relevant when using LTO. It is definitely a finished build option and not a debugging/develop option.

    I'd be very interested in how the binary size changes when using LTO. While there is more in-lining, there may be some dead-code drop and other GCC magic. Just curious if you can say: "when using LTO, the binary size will in general (in/de)crease".

  9. #9

    Default

    Quote Originally Posted by FourDMusic View Post
    I could be wrong, but...

    If you are going to be using LTO, I don't think you are suppose to care about how long it takes to compile.
    agreed. I am impressed that its only 3 times longer. if there are 100 source files then the optimiser has 100 times as much stuff to think about at once. I guess the real slow down is when that makes you hit swap.

  10. #10
    Join Date
    Apr 2012
    Location
    Canada
    Posts
    42

    Default

    Quote Originally Posted by ssam View Post
    agreed. I am impressed that its only 3 times longer. if there are 100 source files then the optimiser has 100 times as much stuff to think about at once. I guess the real slow down is when that makes you hit swap.
    Well that's of course only valid if you're building the source yourself. If this is built into pre-compiled binaries, compile time becomes very irrelevant to the user.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •