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

From: "John Welter" <jwelter AT nwgeo DOT com>
Newsgroups: comp.os.msdos.djgpp
References: <01bd492f$47fb8b40$929175c2 AT ctx> <35004EAB DOT 89131229 AT po-box DOT mcgill DOT ca>
Subject: Re: Speed Test - TC vs. DJGPP
Date: Fri, 6 Mar 1998 13:03:01 -0700
Lines: 62
Organization: North West Group
NNTP-Posting-Host: 207.153.6.200
Message-ID: <35005665.0@news.oanet.com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

And his code is accessing the RTC via BIOS so there are lots of context
switches.  Stay out of real mode and you won't see this overhead.

John Welter
MCSE, Systems Engineer
North West Group

Patrick Griffiths wrote in message <35004EAB DOT 89131229 AT po-box DOT mcgill DOT ca>...
>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