Mail Archives: djgpp/2001/06/06/02:13:34
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 -