delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/06/15:03:02

From: Patrick Griffiths <nospam AT po-box DOT mcgill DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Speed Test - TC vs. DJGPP
Date: Fri, 06 Mar 1998 14:29:48 -0500
Organization: McGill University Computing Centre
Lines: 51
Message-ID: <35004EAB.89131229@po-box.mcgill.ca>
References: <01bd492f$47fb8b40$929175c2 AT ctx>
NNTP-Posting-Host: b52-23.das.mcgill.ca
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I think it's because:
djgpp goes has to do a lot of extra work to
operate in protected mode, that is why the
executables tend to be somewhat larger.

Patrick

Adrian Francis wrote:

> Hi,
>
> I tried the following program in TC 3.0 and DJGPP...
>
> #include <time.h>
>
> void sub(void)
> {
> }
>
> void main(void)
> {
> clock_t start,end;
> long n,time;
>
> clrscr();
> start=clock();
> for (n=0;n<1000000;n++)
> {
> sub();
> }
> end=clock();
> time=(end-start);
> printf("tics:%d",time);
> time/=CLOCKS_PER_SEC;
> printf("sec:%d",time);
> }
>
> ...and got these results...
>
> DJGPP -         tics:13345      sec:146
> TC -            tics:5          sec:0
>
> Can someone explain why this is happening?  I would expect DJGPP to be
> twice as fast considering it is a 32bit compiler.  Something must be wrong!
>
> Thanks!
>
> -ADRIAN-



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019