Date : Mon, 25 Jul 1994 09:36:53 WET DST
From : Bonfield James <jkb@...>
Subject: Re: Beeb Emulators
James Fidell wrote:
>James Bonfield wrote:
>
>> James Fidell wrote:
[ discussion on SR being 8 variables or 1 variable ]
[ JB's ]
>> #define reset_ZN(x) (P = P & ~(P_Z + P_N) | x & 0x80 | (!x)<<1)
[ JF's ]
> Z = x ? 0 : 2;
> N = x & 0x80;
Ok - so you've looked at the code for both of these. How does Stephen Quan's
lookup system compare? It was faster than mine by a small amount. Also I don't
feel my reset_ZN macro listed above is the best to play with. I tested and
tuned this on a DEC Alpha. I've no idea if is fast on a PC.
>That's a lot less instructions. Am I missing something blindingly
>obvious to everyone else ?
Quite possibly not. As I mentioned above, much of my experiments were done on
a DEC Alpha. Possibly this isn't the wisest of choices - I don't feel I really
need to optimise for speed on this machine! :-)
Also, the choice of compiler here can make a huge difference (unfortunately).
gcc on the Alpha actually performed very badly for me.
Your investigations look interesting. If there genuingly is a large difference
in speed then I perhaps ought to switch to the 8 variables model (well, 6 or 7
infact).
James