delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/08/09:44:56

Message-Id: <m0zGO2k-000S3uC@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: Tal Lavi <ranla AT post DOT tau DOT ac DOT il>, djgpp AT delorie DOT com
Date: Tue, 8 Sep 1998 10:45:32 +0000
MIME-Version: 1.0
Subject: Re: MAJOR slowdowns in translating TP7 gfx code to DJGPP2: Suple
In-reply-to: <35F54641.14B6@post.tau.ac.il>

Tal Lavi <ranla AT post DOT tau DOT ac DOT il> wrote:


> Tal Lavi wrote:
> > 
> > A little highly optimized graphics aplication that run prety good on
> > TP7 using mode 0x13, is experiencing a MAJOR slowdown using VBE2.0 in
> > linear frame buffer mode, using two pages for ultra fast flipping.
> > I am probably accessing the LFB memory wrong(_farsetsel, and
> > _farnspoke*). I tried using the inline assembler, but I can't seem to
> > get it working.
> 
> The profiler says that __dpmi_int was used allot, but i swear I haven't
> put even one in the actual run-time part! 

But perhaps you are calling DOS or BIOS though libc.

> Alas, the profiler won't tell
> me from which function was the _dpmi_int(s) was called.
> Does anyone knows whether getch() 

Don't use getch() in a place where speed is a critical factor! put it outside 
any fast loop, check the keyboard ones per frame.

> or _far* calls __dpmi_int?

Eli already told you that farptr stuff are macros expanded to few assembler 
instructions.

> And yet another thing, the div 

What div? 

> function in stdlib.h takes allot of 
> computation time too! I only do two division with it per loop cicle!!!
> what's wrong with that picture?!? 

What kind of divisions? are you using long long?

> div is a integer based division, right? then why does it take over 40%
> of the computation time?

You are doing something wrong, post the code.

SET 
------------------------------------ 0 --------------------------------
Visit my home page: http://set-soft.home.ml.org/
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013

- Raw text -


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