[haiku-development] Re: Optimizing Painter::_DrawBitmapBilinearCopy32 (was: Re: ShowImage patch)

  • From: Stephen Deken <stephen.deken@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 11 Mar 2009 15:25:33 -0500

On Wed, Mar 11, 2009 at 11:59 AM, Christian Packmann <
Christian.Packmann@xxxxxx> wrote:

> So we can do
>     (component_value * 129) >> 23
> to approximate the division by 65025.
>

I'll prefix this by saying I know only slightly more than nothing about MMX
and SSE.  But I do notice:

  (x * 129) >> 23 == (x >> 16) + (x >> 23)

That's just by definition, of course.  Is that faster at all?  (One more bit
of accuracy could be eked out by adding x >> 31, but that's probably
overkill.)

-- 
Stephen Deken
stephen.deken@xxxxxxxxx

Other related posts: