> In a message dated 11/6/98 12:35:48 AM Pacific Standard Time,
> [log in to unmask] writes:
>
> > Better is to use the ISHFT built-in function for the multiply.
> > This is, incidentally, faster than multiplying anyway.
> >
> > idate = ishft(x, 8) to multiply by 256.
> Either way probably generates the same code on most compilers
Don't count on it.
And even if the *256 were recognized as
a shift of 8, it would do an arithmetic shift (which could
overflow), whereas ISHFT does a logical shift.
> which have in-line code generation for ishft().
ISHFT requires only one instruction. It is highly
unlikely that it is not inlined.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|