[Pixman] [PATCH 1/2] mmx: Enable over_x888_8_8888() for x86 as well.

Matt Turner mattst88 at gmail.com
Wed Feb 22 09:26:48 PST 2012


On Tue, Feb 21, 2012 at 7:33 PM, Søren Sandmann <sandmann at cs.au.dk> wrote:
> From: Søren Sandmann Pedersen <ssp at redhat.com>
>
> It used to be slower than the generic code (with the gcc that was
> current in 2007) that doesn't seem to be the case anymore:
>
> over_x888_8_8888 =  L1:  22.97  L2:  22.88  M: 22.27 (  5.29%)  HT: 18.30  VT: 15.81  R: 15.54  RT: 10.35 ( 131Kops/s)
> over_x888_8_8888 =  L1:  53.56  L2:  53.20  M: 50.50 ( 11.99%)  HT: 38.60  VT: 31.19  R: 29.00  RT: 17.37 ( 208Kops/s)
> ---
>  pixman/pixman-mmx.c |    7 -------
>  1 files changed, 0 insertions(+), 7 deletions(-)
>
> diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c
> index 09b2077..609e532 100644
> --- a/pixman/pixman-mmx.c
> +++ b/pixman/pixman-mmx.c
> @@ -3029,7 +3029,6 @@ mmx_composite_copy_area (pixman_implementation_t *imp,
>                     src_x, src_y, dest_x, dest_y, width, height);
>  }
>
> -#ifdef USE_ARM_IWMMXT
>  static void
>  mmx_composite_over_x888_8_8888 (pixman_implementation_t *imp,
>                                 pixman_composite_info_t *info)
> @@ -3086,7 +3085,6 @@ mmx_composite_over_x888_8_8888 (pixman_implementation_t *imp,
>
>     _mm_empty ();
>  }
> -#endif
>
>  static const pixman_fast_path_t mmx_fast_paths[] =
>  {
> @@ -3116,15 +3114,10 @@ static const pixman_fast_path_t mmx_fast_paths[] =
>     PIXMAN_STD_FAST_PATH    (OVER, a8r8g8b8, solid,    x8r8g8b8, mmx_composite_over_8888_n_8888    ),
>     PIXMAN_STD_FAST_PATH    (OVER, a8b8g8r8, solid,    a8b8g8r8, mmx_composite_over_8888_n_8888    ),
>     PIXMAN_STD_FAST_PATH    (OVER, a8b8g8r8, solid,    x8b8g8r8, mmx_composite_over_8888_n_8888    ),
> -#ifdef USE_ARM_IWMMXT
> -    /* FIXME: This code is commented out since it's apparently
> -     * not actually faster than the generic code on x86.
> -     */
>     PIXMAN_STD_FAST_PATH    (OVER, x8r8g8b8, a8,       x8r8g8b8, mmx_composite_over_x888_8_8888    ),
>     PIXMAN_STD_FAST_PATH    (OVER, x8r8g8b8, a8,       a8r8g8b8, mmx_composite_over_x888_8_8888    ),
>     PIXMAN_STD_FAST_PATH    (OVER, x8b8g8r8, a8,       x8b8g8r8, mmx_composite_over_x888_8_8888    ),
>     PIXMAN_STD_FAST_PATH    (OVER, x8b8g8r8, a8,       a8b8g8r8, mmx_composite_over_x888_8_8888    ),
> -#endif
>     PIXMAN_STD_FAST_PATH    (OVER, solid,    null,     a8r8g8b8, mmx_composite_over_n_8888         ),
>     PIXMAN_STD_FAST_PATH    (OVER, solid,    null,     x8r8g8b8, mmx_composite_over_n_8888         ),
>     PIXMAN_STD_FAST_PATH    (OVER, solid,    null,     r5g6b5,   mmx_composite_over_n_0565         ),
> --
> 1.7.4

Indeed. Before and after from my SNB system:

over_x888_8_8888 =  L1:  88.53  L2:  87.95  M: 85.76 (  5.48%)  HT:
74.27  VT: 67.76  R: 66.25  RT: 42.59 ( 536Kops/s)
over_x888_8_8888 =  L1: 263.69  L2: 260.84  M:247.48 ( 15.65%)
HT:197.37  VT:166.21  R:144.30  RT: 72.07 ( 859Kops/s)

And for good measure, SSE2:

over_x888_8_8888 =  L1: 747.44  L2: 735.23  M:635.67 ( 40.42%)
HT:308.51  VT:230.03  R:198.13  RT: 86.94 (1004Kops/s)

Both patches are Reviewed-by: Matt Turner <mattst88 at gmail.com> (I
don't really know if you care about R-b/T-b tags for pixman)


More information about the Pixman mailing list