delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/06/06/02:13:34

Date: Wed, 6 Jun 2001 09:13:31 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: "Yury A. Zaitsev" <yurick AT oblik DOT dp DOT ua>
cc: djgpp AT delorie DOT com
Subject: Re: __djgpp_map_physical_memory - some questions
In-Reply-To: <mq8jf9.n6s.ln@nix-if1>
Message-ID: <Pine.SUN.3.91.1010606090422.14278F@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Tue, 5 Jun 2001, Yury A. Zaitsev wrote:

> Sat, 02 Jun 2001 08:52:48 +0300, Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote:
> 
> >> EZ> The docs clearly says that this is DPMI 1.0 function, and that most
> >> EZ> DPMI hosts don't support it.  Windows doesn't.
> >>    I has been read docs but I hoped against hope :)
> EZ> Abandon hope, anyone who uses Windows ;-)
> 	 But IMHO djgpp works better under windoze dos session, not under 
> dosemu :(, isn't it? 

I wasn't thinking about DOSEmu.

> Why time() is so _incredible_ slow? 100 000 calls of dj's time() takes 
> about 4-5 seconds on the my Cel900 (win95osr2)! I thinked that 
> this is because time() is so complex but under linux (glibc 2.1)
> about 10 000 000(!) time() calls also takes about 3-4 seconds...
> So djgpp's time() is about 100 times slower than linux's time() :(.

If you look into the sources, you will see that the DJGPP version calls 
DOS (twice) to get the system date and time.  Calling a real-mode 
interrupt from a protected-mode program has a huge overhead, due to the 
need to switch the CPU from protected to real mode and back.

>     I has been forced to use clock() (which works fast) instead of time()
> because I need to call it many times...

Why do you need to call `time' many times?  It's unusual that a program 
should need that.

- Raw text -


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