[A83] Re: variable horizontal line routine?


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

[A83] Re: variable horizontal line routine?




The point of using ld a,$FF is obviously that A does not equal $FF the first
time, but it equals something different. Optimizing this for speed is
ridiculous. I'm sure Jonah is quite aware of what lookup tables are for, but
the amount of time you save by having a lookup table is negligible since it
is only used once. Optimizing for size is much more sensible, unless it
slows it down unreasonably (which Jonah's doesn't). But even if you were
optimizing for speed, it might be noted that your routine use IX, which both
adds to size and slows things down quite a bit.

For the record, Jonah's takes 261 tstates average, plus 33 * n where n is
the number of extra bytes in the line. Yours takes 220 tstates constant,
plus 29 * n. I really don't think that the speed difference here is worth
the 43% size increase.

-----Original Message-----
From: assembly-83-bounce@lists.ticalc.org
[mailto:assembly-83-bounce@lists.ticalc.org]On Behalf Of Olle Hedman
Sent: Friday, June 01, 2001 8:04 AM
To: assembly-83@lists.ticalc.org
Subject: [A83] Re: variable horizontal line routine?

ld (hl),$ff doesn't exist?

if it doesn't you should anyway put ld a,$ff outside of the loop and do an
extra ld (hl),a, otherwise it is a slowdown.
we are optimizing for speed here, not size.

///Olle





Follow-Ups: References: