[cairo] Optimizing cairo + pixman [ was: Fwd: cairo+pixman profiling
Steve Snyder
swsnyder at insightbb.com
Thu Nov 8 06:53:23 PST 2007
On Thursday 08 November 2007 2:52:27 am Nguyen Vu Hung wrote:
> Hi all,
>
> As mentioned in my previous email, the bottleneck of cairo + pixman
> falls into fbRasterizeEdges ( pixman ) and unpremultiply_data ( cairo
> ).
>
> I want to optimizing them: make them faster.
>
> What can I do? can gcc's -mmmx and -msse make anything faster?
Those GCC switches do not force the use of the SIMD instructions by the
compiler, they just allow them to be used. (That is, they are legal
instructions.) Besides, they are implicitly enabled by building for any
fairly recent x86 CPU.
> Would it be faster if I write those two functions using inline
> assembler?
You would be better off using compiler intrinsics rather than assembler.
The intrinsics are common to GNU/Microsoft/Intel compilers, where the ASM
format is platform specific.
$ locate intrin | grep gcc
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/ammintrin.h
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/emmintrin.h
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/mmintrin.h
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/pmmintrin.h
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/tmmintrin.h
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/xmmintrin.h
More information about the cairo
mailing list