This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc: speed problem with several g++ versions


On Wednesday 04 August 2004 16:32, Andreas Kowarz wrote:

> According to platform dependent results:
> We have testes the old example on a Pentium3 700 MHz and on an Athlon-XP
> 1666 MHz. The problem with the template version occurred for both machines.

Hmm. Did you try marking you template functions inline? template functions 
aren't neccesarily inlined _automatically_ with all versions of gcc.


I've got this: 
progtemp without inline 10.9 sec.

Then I tagged the _declarations_ inline: 

template <class T> class adouble {
   public:
      inline adouble();
      inline adouble(const T v);
      inline adouble(const T v1, const T v2);
      
      inline void operator = (const T v);
      inline void operator = (const adouble& v);
      
etc...

An I've got:
progtemp with inline 0.7 sec.

Greetings
Marco


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]