[Pixman] [PATCH 11/11] mmx: optimize add_8_8
Matt Turner
mattst88 at gmail.com
Wed Mar 14 21:00:49 PDT 2012
Loongson:
add_8_8 = L1: 523.72 L2: 392.06 M:113.60 ( 79.78%) HT: 58.28 VT: 55.76 R: 43.26 RT: 14.55 ( 146Kops/s)
add_8_8 = L1: 544.04 L2: 407.85 M:114.49 ( 80.01%) HT: 74.33 VT: 61.84 R: 52.84 RT: 18.40 ( 172Kops/s)
ARM/iwMMXt:
add_8_8 = L1: 213.01 L2: 221.38 M:103.59 ( 62.44%) HT: 52.84 VT: 48.04 R: 44.53 RT: 18.19 ( 131Kops/s)
add_8_8 = L1: 285.81 L2: 217.86 M:102.16 ( 60.34%) HT: 56.68 VT: 53.97 R: 47.76 RT: 19.64 ( 143Kops/s)
Signed-off-by: Matt Turner <mattst88 at gmail.com>
---
pixman/pixman-mmx.c | 30 ++++++++++++++++++++----------
1 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c
index 8ad0135..a69aa5b 100644
--- a/pixman/pixman-mmx.c
+++ b/pixman/pixman-mmx.c
@@ -2858,11 +2858,16 @@ mmx_composite_add_8_8 (pixman_implementation_t *imp,
while (w && (unsigned long)dst & 7)
{
s = *src;
- d = *dst;
- t = d + s;
- s = t | (0 - (t >> 8));
- *dst = s;
-
+ if (s)
+ {
+ if (s != 0xff)
+ {
+ d = *dst;
+ t = d + s;
+ s = t | (0 - (t >> 8));
+ }
+ *dst = s;
+ }
dst++;
src++;
w--;
@@ -2879,11 +2884,16 @@ mmx_composite_add_8_8 (pixman_implementation_t *imp,
while (w)
{
s = *src;
- d = *dst;
- t = d + s;
- s = t | (0 - (t >> 8));
- *dst = s;
-
+ if (s)
+ {
+ if (s != 0xff)
+ {
+ d = *dst;
+ t = d + s;
+ s = t | (0 - (t >> 8));
+ }
+ *dst = s;
+ }
dst++;
src++;
w--;
--
1.7.3.4
More information about the Pixman
mailing list