> On Tue, 13 Apr 1999, Si Owen wrote:
>
> > It'd probably work if done as a C union, but I wasn't sure how efficient
> > that'd compile up to be compared to the simple variable version. I might
> > give it a try with HL to see what different it makes.
> >
> > Si
>
> I was under the (probably ill-informed) impression that C unions were
> actually DEAD EFFICIENT. Maybe that efficency goes down if you try to
> access individual bytes from a union of, say, two eight-bit bytes or
> one sixteen-bit word (since those bytes cannot possibly be aligned to a
> 32bit boundary). Try it and see, I guess.
>
> dave
>

I can't imagine the situation, where unions are inefficient.
Go and try it and you will see.
The Z80 emulator I use in my programs use unions and it looks very
efficient.

----------------------------------------------------------------
Aley [eili] Keprt - student, programmer (multimedia soft. etc.)
                    phone: +420-68-538 70 35
     e-mail: [EMAIL PROTECTED]  ***  http://get.to/aley
----------------------------------------------------------------


Reply via email to