[cairo] [PATCH] Altivec optimizations

Baz brian.ewins at gmail.com
Fri Mar 9 16:36:28 PST 2007


On 09/03/07, Carl Worth <cworth at cworth.org> wrote:
> That would be a bug in perf-diff.

Thanks Carl, that had me scratching my head...

Speedups down to 1.25x, OSX 10.4 PPC:

Speedups
========
image-rgba      paint_solid_rgba_over-256    1.25 3.36% ->   0.45
9.51%:  2.80x speedup
image-rgb       paint_solid_rgba_over-256    1.22 2.01% ->   0.45
4.79%:  2.74x speedup
image-rgb       paint_solid_rgba_over-512    6.52 0.65% ->   3.34
2.02%:  1.95x speedup
image-rgba      paint_solid_rgba_over-512    6.50 1.22% ->   3.35
1.53%:  1.94x speedup
image-rgba      fill_similar_rgb_over-256    2.42 1.84% ->   1.87
2.71%:  1.30x speedup
image-rgb      fill_similar_rgba_over-256    2.34 2.82% ->   1.82
5.47%:  1.29x speedup
image-rgb        fill_image_rgba_over-256    2.33 2.61% ->   1.82
4.33%:  1.28x speedup
image-rgb         fill_image_rgb_over-256    2.41 3.48% ->   1.89
6.44%:  1.28x speedup
image-rgba    fill_similar_rgb_source-256    2.87 1.51% ->   2.26
1.47%:  1.27x speedup
image-rgba       fill_image_rgba_over-256    2.29 1.97% ->   1.81
2.07%:  1.27x speedup
image-rgba     fill_image_rgba_source-256    2.78 1.45% ->   2.19
1.42%:  1.27x speedup
image-rgba     fill_similar_rgba_over-256    2.29 2.17% ->   1.81
2.83%:  1.27x speedup
image-rgba        fill_image_rgb_over-256    2.39 2.09% ->   1.89
2.69%:  1.27x speedup
image-rgba   fill_similar_rgba_source-256    2.78 1.45% ->   2.20
1.73%:  1.27x speedup
image-rgb       fill_similar_rgb_over-256    2.39 3.24% ->   1.89
3.94%:  1.26x speedup
image-rgba      fill_image_rgb_source-256    2.86 1.59% ->   2.27
1.91%:  1.26x speedup
image-rgb      paint_linear_rgba_over-256    3.95 1.79% ->   3.14
0.67%:  1.26x speedup
image-rgb       fill_image_rgb_source-256    3.05 6.15% ->   2.43
4.49%:  1.26x speedup

Top stuff. There are speedups in the 10% range for many, many more
tests. Only a small number of tests slowed down:

Slowdowns (down to 1.01x):
Slowdowns
=========
image-rgba    paint_image_rgba_source-256    0.24 10.84% ->   0.28
18.12%:  1.18x slowdown
image-rgba  paint_similar_rgba_source-256    0.24 4.80% ->   0.26
5.74%:  1.06x slowdown
image-rgba     paint_similar_rgb_over-256    0.58 9.66% ->   0.60
17.04%:  1.03x slowdown
image-rgb   paint_similar_rgba_source-256    0.33 5.44% ->   0.34
7.00%:  1.03x slowdown
image-rgba       paint_image_rgb_over-256    0.58 13.48% ->   0.59
13.47%:  1.02x slowdown
image-rgba      paint_image_rgba_over-256    1.55 5.00% ->   1.58
9.20%:  1.02x slowdown
image-rgba     paint_image_rgb_source-256    0.57 12.74% ->   0.59
11.45%:  1.02x slowdown
image-rgb     paint_image_rgba_source-256    0.34 7.24% ->   0.35
10.38%:  1.02x slowdown
image-rgb         fill_solid_rgb_over-256    1.29 4.68% ->   1.31
3.04%:  1.02x slowdown

That top slowdown looks nasty, but the stdev is pretty high, and it
didn't show up that high on the first run (the second run posted a
large number and it seems to have stuck up there). Overall this looks
great, good work Luca.

So Luca, there's only a few issues remaining with the patch:
- theres a '$cc' test that should be '$CC' in configure.in (fixed)
- I should really test this on PPC Linux and OS X 10.3 to be sure
build glitches have been resolved, which I'll try to do this weekend.
- theres some debug prints, // comments, and trailing space in the
patch that should be tidied up. I'm happy to sort this out.

You mentioned that you have more (the pict ops). Do you want to
produce an updated patch, or go with this one for now, and add them
later?

Cheers,
Baz


More information about the cairo mailing list