why so slow? gcc vs vc6
Georg Steffers
georg@steffers.org
Thu Apr 21 09:04:00 GMT 2005
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...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20050421/7c2cce75/attachment.sig>
More information about the Gcc-help
mailing list