Hey,
I'm porting to Windows CE a canvas library which uses the GAPI library as backend. It uses a lot the memcpy function (I use a backbuffer and copy that buffer to the frame buffer of the device). I've looked on internet about fast memcpy functions (asm optimized), as i've also read that memcpy is slow on arm.
I've found an asm implementation of memcpy which uses arm v5te (at least) instructions and compared it with memcpy which is in cegcc 0.51. I've attached a test program. Just run 'make' to create the program. Note that I compile with -march=armv5te -O3 -fomit-frame-pointer. I don't know if it's the best flags for best performance wrt that test.
On big data (like 320 * 240 * 2, like when one copies the entire screen of a qvga device, which is my case), the bandwidth is around 23 MB/s with the cegcc memcpy, and around 70 MB/s with the asm implementation. My device is the Ipaq H3970. So on that device, it's almost 3 times faster than memcpy in newlib. Even on non aligned data.
I use a lot memcpy in that canvas library, but I think that that function is used a lor around and everyone would benefit such optimized implementation.
My question is then: would it be possible to optimized memcpy with or without using that asm implementation of memcpy, as it is very slow ? If you want to use that asm implementation, look at the copyright notice in memcpy_libc.S
I've quickly compared with the memcpy which is in uclibc and it seems that this one is slower than memcpy_libc.S, but I have maybe did wrong modifications to make it work. The uclibc one is nevertheless faster than std implmentation, especially on non aligned data:
~20 MB/s with newlib ~27 MB/s with uclibc~70 MB/s with memcpy_libc.S (strange though, the difference is really huge)
regards Vincent Torri
memcpy.tar.bz2
Description: Binary data
------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________ Cegcc-devel mailing list Cegcc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cegcc-devel