program executin times differ between gcc versions
Marco Aurélio da Cruz
m.cruz@daruma.com.br
Thu Nov 1 15:47:00 GMT 2007
Hi Paul,
And what about volatile variables?
If you have variables that might be modified by multiple threads you
should declare them as volatiles in order to prevent compiler
optmization and wrong execution.
Marco
Tim Prince wrote:
> Joel Dice wrote:
>> On Thu, 1 Nov 2007, Paul Moore wrote:
>>
>>> Dear List,
>>
>> <snip>
>>
>>> Using optimization flags is not possible due to the fact that large
>>> parts of the application failed in -O test runs and would need to be
>>> fixed/tested extensively first. Profiling with -pg/gprof has not been
>>> produced usable results as shared libraries are not being tracked.
>>
>> In my experience, OProfile (oprofile.sourceforge.net) is much better
>> than gprof at revealing the hotspots in my programs, including time
>> spent in shared libraries. I strongly recommend it.
> When hotspots occur in libraries, gprof is satisfactory only with
> static linking. Library questions seem unlikely to be relevant in
> this thread.
>>
>> OTOH, I would worry more about correctness than performance at this
>> point if the code breaks with optimization turned on.
>>
> That's for sure. gcc is unlikely to break reliable code with
> optimization, unless -ffast-math is set.
>
>
> ---AV & Spam Filtering by M+Guardian - Risk Free Email (TM)---
>
>
>
--
Marco Aurélio da Cruz
Depto. de Automação
Divisão de Tecnologia
Daruma Urmet S.A.
Tel.: +55 12 3609-5105
Fax: +55 12 3609-5156
Web: http://www.daruma.com.br
More information about the Gcc-help
mailing list