Re : execution time of a c++ program

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

 



I heared that gprof can provide such info, am I wrong ?
that's why I am asking this question in a gcc mailing list.
One of code optimization goal is to reduce execution time, and gcc users had to measure the execution time of a program to evaluate optimizations.
they should be familiar with tools that measures the execution time...

Thanks




----- Message d'origine ----
De : Ian Lance Taylor <iant@xxxxxxxxxx>
À : charfi asma <charfiasma@xxxxxxxx>
Cc : gcc-help@xxxxxxxxxxx
Envoyé le : Mer 21 avril 2010, 16 h 58 min 55 s
Objet : Re: execution time of a c++ program

charfi asma <charfiasma@xxxxxxxx> writes:

> how can we measure the time spent to execute a C++ program (not to compile it) ?
>
> should we add code to calculate manually this time (using Time.h or other predefined classes in predefined library like boost  ?


This is not really a gcc question at all.  You may want to consider
asking on a C++ language forum.


If you want to measure the time for a complete execution, you can just
the Unix time command.  Otherwise, I think you have to modify the
program.  I don't know whether Boost has any helpful classes here.

Ian






[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux