In cairo-xlib-surface.c, it should be possible to get a 2x to 4x speed improvement for _swap_ximage_[24]bytes by using facilities provided in <byteswap.h> (under glibc systems), or by using recent GCC's builtin __builtin_bswap32. Arno
Created attachment 16783 [details] test program with various byteswap implementations The test program itself is too simple minded, but this attachment shows several possible implementations of byteswapping which can be of interest. $ gcc -O2 byteswap.c -o byteswap $ ./byteswap UINT32_GCC_SWAP time spent: 1114 cairo code time spent: 2247 UINT32_SWAP time spent: 2225 UINT32_GLIBC_SWAP time spent: 747
commit 5de0650dbbed7a44789f25b0a5226593931a8ce8 Author: Behdad Esfahbod <behdad@behdad.org> Date: Wed May 28 10:43:47 2008 -0400 [cairo-xlib] Add recently-added byteswap macros (#16128) commit dd8f3a5690e92ac3421e5bbc475cc3e78865d8ef Author: Behdad Esfahbod <behdad@behdad.org> Date: Wed May 28 10:43:22 2008 -0400 Add support for byteswap macros bswap_16 and bswap_32
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.