[A83] Re: Why is my program so slow :(


[Prev][Next][Index][Thread]

[A83] Re: Why is my program so slow :(




The reason your program might be 'slow' probably is because you use floating 
point math. Calculating a sine or a cosine in asm is as slow as in basic 
simply because you use the same code to do so. Games like Penguins or any 
other game are 'fast' because they don't use floating point numbers, they 
make direct use of the processor to calculate a few things, not as in basic 
where you (have to) use floating point numbers for even the simplest 
calculations. That's actually the main speed gain in asm. It's all in the 
small, little things :-)

>From: "TypeR unknown" <typerfuture@hotmail.com>
>Reply-To: assembly-83@lists.ticalc.org
>To: assembly-83@lists.ticalc.org
>Subject: [A83] Why is my program so slow :(
>Date: Tue, 07 Aug 2001 19:04:55 +0200
>
>
>After making a couple of programs which calculate things, I want to make a
>program with graphics, so I decided I was going to make a program which is 
>a
>model of a piston engine.
>Unfortunatly I quikly stopped after running a little code on my calc 
>because
>it was horrificly slow, well at least not what I expected from ASM.
>
>I didn't let it draw much, I simply made it draw two lines, do some 
>floating
>point math with _sin en _cos to calculate the next coordinates and draw the
>next two lines.
>
>But it was very slow:(
>I've seen program's like ski and pinguin by Bill Nagel and they can move 
>the
>ENTIRE screen very fast, so I know the calc is up to it.
>
>Is it because my program doesn't use a buffer or it isn't squished??
>My programming might not be "top-notch" and nothing compared to Bill Nagel
>but I didn't let it draw much, so why is it so slow???
>


_________________________________________________________________
Download MSN Explorer gratis van http://explorer.msn.nl/intl.asp