Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - gcc 4.8.3 compile speed: (5 Items)
   
gcc 4.8.3 compile speed  
Using gcc 4.8.3 (for QNX650 ) it turn out that compile time has increase by 25%.  I just wonder if 4.8.3 as downloaded 
from foundry was compile with optimisation flag ?
Re: gcc 4.8.3 compile speed  
On 14-08-26 11:31 AM, Mario Charest wrote:
> Using gcc 4.8.3 (for QNX650 ) it turn out that compile time has increase by 25%.  I just wonder if 4.8.3 as downloaded
 from foundry was compile with optimisation flag ?

Hi Mario,

Yes, it was built with the default optimization for gcc (-O2).  I just 
double checked the build logs to be sure.

Which host are you running?
Are your numbers comparing 4.8.2->4.8.3, or 4.8.3 with an older version 
of gcc?
Can you compare the runs with -ftime-report?
Can you share the preprocessed source so I can have a look?

Regards,

Ryan Mansfield




Re: gcc 4.8.3 compile speed  
> On 14-08-26 11:31 AM, Mario Charest wrote:
> > Using gcc 4.8.3 (for QNX650 ) it turn out that compile time has increase by 
> 25%.  I just wonder if 4.8.3 as downloaded from foundry was compile with 
> optimisation flag ?
> 
> Hi Mario,
> 
> Yes, it was built with the default optimization for gcc (-O2).  I just 
> double checked the build logs to be sure.
> 

Ok thanks. I wanted to get that out of the way first, given the non official nature of the release.

> Which host are you running?

Ubuntu 14 64 bits.

> Are your numbers comparing 4.8.2->4.8.3, or 4.8.3 with an older version 

4.4.2 versus 4.8.3.

> of gcc?

> Can you compare the runs with -ftime-report?
> Can you share the preprocessed source so I can have a look?

The two setups aren't 100% identical.  

 4.4.2 : boost 1.45, dinkum, std=gnu++0x
 4.8.3: boost 1.55, gcc lib, std=gnu++11

At this point, given your answer, I feel that some of these differences in the environment might explain the 25% 
difference and will post-pone the investigation as it will be very difficult to acheive given dinkum isn't available for
 4.8.3.to, we have more pressing issue to resolved.  We can live with the extra 25%.  That being said if you still want 
the information you requested I'd be happy to provide it.

> 
> Regards,
> 
> Ryan Mansfield
> 
> 
> 
> 


Re: gcc 4.8.3 compile speed  
On 14-08-26 01:14 PM, Mario Charest wrote:
> The two setups aren't 100% identical.
>
>   4.4.2 : boost 1.45, dinkum, std=gnu++0x
>   4.8.3: boost 1.55, gcc lib, std=gnu++11

Lot of variables to compare there :)

As you probably know,  gcc 4.8 is the first release where gcc is built 
as c++ but I haven't seen any concrete numbers or justification that 
show it's to blame. Between 4.4, and 4.8, there's certainly more 
optimization passes being done, but it's hard to say that's where the 
time is being spent.

Are you building with debug? There's a known increase in compile times 
due to improved debug information generation. But non-debug builds have 
been measured as comparable: See:

https://gcc.gnu.org/ml/gcc/2013-03/msg00133.html

If I have time, I'll try to do a similar comparison as yours and look 
into where the time is going.

Regards,

Ryan Mansfield
Re: gcc 4.8.3 compile speed  
> On 14-08-26 01:14 PM, Mario Charest wrote:
> > The two setups aren't 100% identical.
> >
> >   4.4.2 : boost 1.45, dinkum, std=gnu++0x
> >   4.8.3: boost 1.55, gcc lib, std=gnu++11
> 
> Lot of variables to compare there :)

yeah.

> 
> As you probably know,  gcc 4.8 is the first release where gcc is built 
> as c++ but I haven't seen any concrete numbers or justification that 
> show it's to blame. Between 4.4, and 4.8, there's certainly more 
> optimization passes being done, but it's hard to say that's where the 
> time is being spent.
>

I haven't compare the performance of the genearted executables yet. If they are faster that'll be worth it.

> Are you building with debug? There's a known increase in compile times 
> due to improved debug information generation. But non-debug builds have 
> been measured as comparable: See:
> 

No debug flags are used.

> https://gcc.gnu.org/ml/gcc/2013-03/msg00133.html
> 
> If I have time, I'll try to do a similar comparison as yours and look 
> into where the time is going.

As you suggested I use -ftime-report to do a better comparison.  I was able to build most of the code with boost 1.45/
gcc4.8.3 The difference is only 2% faster with 1.45.

With 4.4.2 and gpp lib instead of dinkum it's faster!! from 0 - 10%.

So it seems there isn't much I could do to speed it seems to be dependant more on the compiler than on the library it's 
using.

Thanks for the quick feedback.

> 
> Regards,
> 
> Ryan Mansfield