freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] FT_MulDiv optimization


From: Alexei Podtelezhnikov
Subject: Re: [ft-devel] FT_MulDiv optimization
Date: Sat, 5 Jul 2014 23:05:29 -0400

On Sat, Jul 5, 2014 at 2:05 AM, Werner LEMBERG <address@hidden> wrote:
>>> >> a + b < 92681 - (c >> 16) + ((c+ 235935) >> 18)
>>> >
>>> > How about the simpler:
>>> >
>>> > a + b <= 92681 - (c >> 16)
>>>
>>> I like this!
>>
>> Pushed.
>
> Thanks a lot!  However, please expand the comment, since the involved
> mathematics is not trivial.  For example, it is non-obvious to have a
> multiplication
>
>   (a * b + c/2) / c
>
> but the condition only contains an addition.  IMHO there is one step
> missing in the explanation chain.  Similarly, I ask you to add the
> formula for the Taylor expansion.
>
> And you should add your name there, too :-)

Ok. I improved the comment. The Taylor expansion was not appropriate there.

Now the big question is if we should go 64-bit always when it is
available. We do so right now. The above check for 32-bit is cheap,
while 64-bit division is very, very, very expensive.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]