On 19 Mar 2001, Joaquin Cuenca Abela wrote:
> On 19 Mar 2001 14:04:57 +0400, Vlad Harchev wrote:
> >
> > Then the following could be used to multiply 'x' by 1.5:
> > (x + x<<1) >> 1
> >
> > I will be very fast.
Hmm, that would be better written as
x + x>>1
That will definitely be faster than x*1.5
> uhm, it's not so readable as x = x * 1.5. In addition, if later we
> decide to change from 1.5 to something else, it becomes harder. And in
We may decide not to change it simply..
> addition I don't think that this "optimization" is need at all (of
> course, some figures will shut me down).
As for whether it will help at all - I doubt that too - those 4+ saved CPU
cycles won't change anything..
> Cheers,
>
> --
> Joaqu�n Cuenca Abela
> [EMAIL PROTECTED]
>
Best regards,
-Vlad
- Re: suggestion: slight optimization for UT_String Mike Nordell
- Re: suggestion: slight optimization for UT_Strin... Joaqu�n Cuenca Abela
- Re: suggestion: slight optimization for UT_S... Vlad Harchev
- Re: suggestion: slight optimization for ... Joaquin Cuenca Abela
- Re: suggestion: slight optimization ... rms
- Re: suggestion: slight optimiza... Joaquin Cuenca Abela
- Re: suggestion: slight optimiza... Randy Kramer
- Re: suggestion: slight opti... rms
- Code generation [was: sugge... Mike Nordell
- Re: Code generation [was: s... Randy Kramer
- Re: suggestion: slight optimization ... Vlad Harchev
- Re: suggestion: slight optimiza... Joaqu�n Cuenca Abela
- Re: suggestion: slight optimization for UT_S... Joaquin Cuenca Abela
- Re: suggestion: slight optimization for UT_String Dom Lachowicz
