#117926 - Risine - Thu Feb 08, 2007 7:15 pm
I've got some real strange behaviour with RAM speed access.
I'm creating a whole image in an allocated short array ( dst=new... ).
and have something like :
fnt toto
{
...
for (each pixel) {
...
dst[y]=colour;
}
...
}
It takes really a very long time ( x2 ), compared to this :
fnt toto
{
short temp[4]; // local test array
...
for (each pixel) {
...
temp[y&3]=colour;
}
...
}
How can it be possible?
It takes more time writing this pixel in RAM, than reading it from ROM and treating it.
I'm creating a whole image in an allocated short array ( dst=new... ).
and have something like :
fnt toto
{
...
for (each pixel) {
...
dst[y]=colour;
}
...
}
It takes really a very long time ( x2 ), compared to this :
fnt toto
{
short temp[4]; // local test array
...
for (each pixel) {
...
temp[y&3]=colour;
}
...
}
How can it be possible?
It takes more time writing this pixel in RAM, than reading it from ROM and treating it.