|
|
How can i measure runtime??
Hi all,
Is it possible to measure the execution time and complexity of my
program in bloodshed developer c++ ?If so, please tell me how.
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
0
|
|
|
|
Reply
|
vidit.iitr (2)
|
8/1/2006 12:41:30 PM |
|
vidit wrote:
> Hi all,
> Is it possible to measure the execution time and complexity of my
> program in bloodshed developer c++ ?If so, please tell me how.
Well, it's not exactly a question about C++ language, but as far as I
understand, Bloodshed environment used gcc as their C/C++ compiler. gcc
allows you to use profiling. For more information google 'gprof' which
is a profiler that gcc uses.
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
0
|
|
|
|
Reply
|
Michael
|
8/1/2006 7:59:54 PM
|
|
vidit wrote:
> Is it possible to measure the execution time and complexity of my
> program in bloodshed developer c++ ?If so, please tell me how.
I don't know about 'bloodshed developer c++' but you're most likely
looking for what is called "a profiler". Google for it or ask in the
newsgroup dedicated to your OS -- they are platform-specific.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
0
|
|
|
|
Reply
|
Victor
|
8/2/2006 1:26:44 AM
|
|
Hi,
> Is it possible to measure the execution time and complexity of my
> program in bloodshed developer c++ ?If so, please tell me how.
Runtime: Yes. That's the clock() function declared in <ctime>
that would come helpful. It might not be very precise, or precise enough
for your purpose. Other bets are(less standardized) gettimeofday()
(POSIX, not ANSI-C) or the command line program "time" (likely also
POSIX, clearly not ANSI-C), or the high-precision timers of windows
(only Win32, not POSIX, not ANSI), or the profiler of your choice
(entirely compiler dependent), e.g. gprof of the GNU toolchain.
Complexity: I'm not aware how I should be able to measure this.
Complexity gives asymptotic behaivour of algorithms for the data set
size growing to infinity, thus this is something that must be proven
and cannot really be measured on a finite machine.
So long,
Thomas
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
0
|
|
|
|
Reply
|
Thomas
|
8/2/2006 12:22:43 PM
|
|
|
3 Replies
350 Views
(page loaded in 1.828 seconds)
Similiar Articles: How can i measure runtime?? - comp.lang.c++.moderatedHi all, Is it possible to measure the execution time and complexity of my program in bloodshed developer c++ ?If so, please tell me how. [ See... How to set locale for application at runtime? - comp.lang.java ...How can i measure runtime?? - comp.lang.c++.moderated Complexity gives asymptotic behaivour of algorithms for the data set ... How to set locale for application at runtime ... Division by Constant (again) - comp.lang.asm.x86How can i measure runtime?? - comp.lang.c++.moderated Division by Constant (again) - comp.lang.asm.x86 (Except for 31, which is a special case) You can calculate the ... java profiling question - comp.lang.java.helpThen, I run ./jconsole 12905 I got "12905 is not a managed VM" How can I run ... How can i measure runtime?? - comp.lang.c++.moderated Well, it's not exactly a question about ... Execution error 114 - comp.databases.btrieveHow can i measure runtime?? - comp.lang.c++.moderated Execution error 114 - comp.databases.btrieve How can i measure runtime?? - comp.lang.c++.moderated Execution error ... How to estimate exectution time - comp.soft-sys.matlabHow can i measure runtime?? - comp.lang.c++.moderated Hi all, Is it possible to measure the execution time and complexity of my program in bloodshed developer c++ ?If so ... measure FPS - comp.graphics.api.openglHelp to calculate time complexity of a program - comp.soft-sys ... How can i measure runtime?? - comp.lang.c++.moderated Hi all, Is it possible to measure ... with help ... Latitude and Longitude values for a Particular Location - comp ...How can i measure runtime?? - comp.lang.c++.moderated... to your OS -- they are platform-specific. V ... Convert from HEX to decimal Latitude and Longitude - comp.lang ... how can I change the priority of thread during Runtime? - comp ...How can i measure runtime?? - comp.lang.c++.moderated how can I change the priority of thread during Runtime? - comp ... Hi volks, I'm wondering how I can change the ... Initial Capitals - comp.lang.rexxHow can i measure runtime?? - comp.lang.c++.moderated Initial Capitals - comp.lang.rexx I've appended my routine below, but I wonder if anyone can improve on my ... How can i measure runtime?? - comp.lang.c++.moderated | Computer GroupHi all, Is it possible to measure the execution time and complexity of my program in bloodshed developer c++ ?If so, please tell me how. [ See... How can I calculate runtime in milisecond in C - Yahoo! AnswersBest Answer: include the timer.h header At the start of your main () time_t t1,t2; (void) time(&t1); // MAIN CODE // MAIN CODE (void) time(&t2); printf ... 7/24/2012 1:29:29 AM
|
|
|
|
|
|
|
|
|