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: why so slow? gcc vs vc6


I've got the problem. I spent too much time on a function which is
deeply inside the loop.
most of the caculation is not necessary, as most of them just yield
repeating result.
I'll try modifying the code.
Thanks everybody!

On 4/21/05, Georg Steffers <georg@steffers.org> wrote:
> As far as I understand profiling you must not read the time results as
> the values you got without profiling. Profiling is there to find
> inefficiencies in your code, such as unneccessary loops etc. and thus
> the times are only to compare the different calls. Additionally it is
> very likely that gprof called you app several times, to get a better
> comparison. (That is only how i understand profiling, dont beat me if i
> am wrong)
> 
> You can see that your program spend the most time for the logarithmic
> calculation, followed by the power caculation.
> 
> In my opinion your problem is that you did not use fast-math, as far as
> i know vc uses a math lib with similar optimizations by default.
> 
> so as Ishwar Rattan mentioned, if speed is important and vc6 is faster
> that use vc6.
> 
> greets Georg
> 
> Am 21.04.2005 08:17:12 schrieb(en) CyberSnoopy:
> > I've tried gprof
> > this is the result
> > Flat profile:
> >
> > Each sample counts as 0.01 seconds.(what does this mean?)
> >   %   cumulative   self              self     total
> >  time   seconds   seconds    calls   s/call   s/call  name
> >  32.23      7.56     7.56                             __ieee754_log
> --snip--
> >   0.02     23.45     0.01
> --snip--
> > I'm wondering is the total time as much as 23.46 seconds? I'm
> > comfused...
> 
> 
>


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