05-29-2010, 09:54 AM
britlion Wrote:Cool! I'll look into trying to break that. Shaving most of a second off a 2 second benchmark is still impressive.It is. Even funnier: ZX BASIC doesn't do that either for 16 bits :mrgreen: So I've just put it. :wink:
Curiously, I can see the odd optimization in Hisoft routines too:
Code:LD DE, $0005
AND A
SBC HL, DE ; HL = k / 2 * 3 + 4 - 5
Is probably better done as:
Code:LD DE, -5
ADD HL,DE
Which doesn't need the AND A so shaves one byte and 4 T states off every fixed 16 bit subtract.