Thread overview
compile time performance on Windows
Apr 08, 2006
archwndas
Apr 08, 2006
cdt
Apr 08, 2006
Nic Tiger
April 08, 2006
Dear DMC developers,
I would like to measure how much time
my programs need to be built in Windows
with several compilers. Unfortunately
I do not know how can I do this. Windows
as far as I know do not have a program
equivalent of Unix time().

Can anybody help me?
Thanks in advance!
Archondis Simiotis.


April 08, 2006
In article <e17m3u$1595$1@digitaldaemon.com>, archwndas@yahoo.com says...
>
>Dear DMC developers,
>I would like to measure how much time my programs need to be built in Windows
>with several compilers.

If you are talking about elapsed time of compilation, then its provided by
almost all borlands compiler-IDEs.
It also gives effective lines compiled. line count includes the header files. So
its will give you clear idea lines compiled per second.

Still between 2 compilers, due to different sets of default header files, for same package, lines compiled will change.

I am new for DM, and I am yet to trace full potential provided by DM I(D)DE,

But, c++ developers commpunity accpets that DM and Borland compiler are faster. Benchmark of execution speed .... you are the best judge. ( as every compiler clams , its fastest )

-CDTamhankar


April 08, 2006
archwndas@yahoo.com wrote:
> Dear DMC developers,
> I would like to measure how much time my programs need to be built in Windows
> with several compilers. Unfortunately
> I do not know how can I do this. Windows
> as far as I know do not have a program
> equivalent of Unix time(). 
> 
> Can anybody help me?
> Thanks in advance!
> Archondis Simiotis.
> 
> 

if you have DMC CD, than this utility named timer.cpp is located in dm\ctools\SRC\timer.c

if you haven't, this utility can be easily written
something about (but check for spawnvp, maybe argv should be copied before usage):

main(int argc,char **argv){
  clock_t clock(),starttime;
  int status;

  if (argc < 2)
    return 1;

  starttime = clock();
  status = spawnvp(0,argv[1],(const char * const *)(argv + 1));
  starttime = clock() - starttime;
  if (status == -1) {
    printf("'%s' failed to execute\n",argv[1]);
    return 1;
  }
  printf("time = %d.%03d seconds\n",(int) (starttime/CLK_TCK),
	 (int) (starttime%CLK_TCK));
}