freepooma-devel
[Top][All Lists]
Advanced

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

Re: [pooma-dev] Runtime optimized/non-optimized


From: Richard Guenther
Subject: Re: [pooma-dev] Runtime optimized/non-optimized
Date: Thu, 25 Apr 2002 21:41:56 +0200 (CEST)

On Thu, 25 Apr 2002, Nils H. Busch wrote:

> Hello,
> 
> I have a general question, I could not exactly answer myself.
> 
> Why is the runtime of Pooma code so much longer when running in debug
> mode (-g) compared to optimized code (-Ox), order of magnitude at least
> 10x? This concerns both apps compiled in both ways as also the library
> itself.
> Even for parts that are not Pooma related, there is a great runtime
> difference.
> I suspect, it has to do with the template expression mechanism, but I
> would like to understand exactly what the compiler does so differently.

The compiler usually refrains from inlining any functions with -g - and
inlining is essential for the expression template mechanism to work
with acceptable performance.

Try using -O -g instead - at least gcc does inlining with -O, so you
should get better performance while still being able to debug (with
some restrictions for the expression templates, of course).

Richard.

--
Richard Guenther <address@hidden>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/
The GLAME Project: http://www.glame.de/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]