Tomas Frydrych wrote:
There seems to be no source for the functions in the tarball.
Siarhei Siamashka wrote:
Hello All,
Here are the optimized memory copying functions for Nokia 770
(memset is more than twice faster, memcpy improves about 10-40%
depending on relative data blocks alignment).
http://ufo2000.sourceforge.net/files/fastmem-arm-20060312.tar.gz
...
Like Dirk already replied, the implementation is in macros in the .h
file. I'm sorry for not providing detailed instructions about using this
tarball. Here they are:
# wget http://ufo2000.sourceforge.net/files/fastmem-arm-20060312.tar.gz
# tar -xzf fastmem-arm-20060312.tar.gz
# cd fastmem-arm
Now compile and run the test(in scratchbox using sbrsh cpu
transparency method):
# gcc -O2 -o fastmem-arm-test fastmem-arm-test.c
# ./fastmem-arm-test
If you want to use this optimized code in your programs, just add
"fastmem-arm.h" file to your project and the following line into your
source files:
#include "fastmem-arm.h"
And now you can use these functions (which are provided as a set of
macros using inline assembler, so they are all contained within
"fastmem-arm.h" file which is their source), the most simple to use is
'memset8', it is a direct replacement for 'memset' and can be used
instead of it to provide a huge performance boost.
The functions are optimized for different alignments, for example:
uint16_t *memcpy16(uint16_t *dst, uint16_t *src, int count)
It copies only 16-bit buffers, but it still can be used for a fast copy
of 16-bit pixel data (as Nokia 770 uses 16-bit display). I can make
'memcpy8' function later, but expect its sources to grow about twice
and become much more complicated (because of more complicated handling
of leading/trailing bytes and 2 more relative alignment combinations).
It will take some time.
Hope this information helps. Still waiting for feedback :)
_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers