compilation time increased from 10 sec to 24 sec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

In one of my project, I noticed that the compilation time for a code
using gcc/4.0.2 increased from 10 sec to 24 sec. I could not figure out
the reason for this marked increase in the compilation time.
For this project, the compilation time is very crucial and hence
I would really appreciate any useful suggestions.
==============================================
code1.cc
// This takes only 10 sec for compilation

void func(sim_t sim, int pc)
{

{
count++; 				  // Line 1
sim->_sym30679_5(7, 0, 100);             // Line 2
}

// Repeats like above piece of code 1000 times
// ...
//...
//...
}
=============================================
code2.cc:

// This takes 24 sec to do the compilation
// Line 1 is replaced by a another expression
void func(sim_t sim,  int pc)
{

{
sim->NIA_write(sim->CIA_read() + 4); sim->_sym30679_5(7, 0, 100); // Line 2
}

// Repeats like above piece of code 1000 times
// ...
//...
//...

}
==============================================
void NIA_write_internal(const bits<32> &x) {
   NIA().set_data() = x;
 };
void NIA_write(const bits<32> &x) {
   NIA_write_internal(x);
   NIA_trace();
 };
bits<32> & CIA_read() {
   return CIA().get_data();
 };
==================================================

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux