Re: A83: Pixel/Line/Rectangle Routines. =)


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

Re: A83: Pixel/Line/Rectangle Routines. =)




Calls all throughout?  Sure.  But, "call z" takes 17 clocks (if it 
jumps) and ret takes 10 clocks.  "jr z" takes 12 clocks (if it jumps) 
and "jr" takes 12 too.  Thats 27 to 24.  Moreover, if c==2, then 
PIXEL_WHITE will be called *and* the cp/callz will still be executed 
(wasting clocks).  What I mean is, after returning from PIXEL_WHITE, an 
extra 4 commands will execute but perform no usefull action.  jrz/jr 
skips right to the end and ignores extra checking.

Just a thought.

> so it could be called from anywhere in the program <
You mean, like if you called PIXEL_WHITE directly instead of calling 
PIXEL?




>From: Jkhum98@aol.com
>Date: Sun, 20 Dec 1998 15:34:06 EST
>To: assembly-83@lists.ticalc.org
>Subject: Re: A83: Pixel/Line/Rectangle Routines. =)
>Reply-To: assembly-83@lists.ticalc.org
>
>
>
>In a message dated 12/20/98 2:32:43 PM, rdaneelolivaw@hotmail.com 
writes:
>
>>Hey, these are some really nice routines (SOS lib to be perhaps?).
>>I took a look at "PIXEL" and saw some places I thought could be
>>optimized.  Take a look (my changes have >- at the start):
>> . . .
>
>Hey those were some nice optimizations there, thanks. =)  Also, with 
the
>number of times that PIXEL is run in each of those other routines, this 
should
>Really cut back on their execution time... =)
>
>>This uses relative jumps instead of calls and returns.  What do you 
>>think?
>
>That was a nice idea, but I want to stick to Calls, ya know?  so it 
could be
>called from anywhere in the program, and it'd be difficult to have to 
adjust
>if you started jumping around in these routines... Although, when the 
routine
>is first called by the user, I guess the program pointer could be saved 
and
>retrieved later, but this would cause the routine as a whole, to 
increase in
>bytes and decrease in speed... :\  I think using Calls All throughout 
is just
>fine... =P
>
>>Ok, that's my 2 cents.  I could really use this kind of code, so I 
hope 
>>to see it in a lib. :)
>
>Thanks for your 2 cents and those optimizations, I'm glad I got Some 
response
>to my mail... =)  Well, about these routines becoming SOS routines, I 
think
>its realistic to include these into ZLIB because they are General-Use 
routines
>that Anybody could use, and they're doing pretty good on Size and Speed 
unless
>someone can optimize them further... Yes, I think they are very 
"ZLIB-Worthy",
>what do you think Joe? :)
>															--Jason K.
>


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com