Page 1 of 1

optimisation

Posted: Thu Jul 08, 2010 1:33 pm
by Jaklub
Hello. I'm back with more questions. I use Stef's Genesis Mini DevKit (v0.4). CAUTION: I still don't have much technical knowlegde.

1. Operations on which datatypes are fastest?
2. What's the easiest way to detect bugs related to memory? Or if one doesn't exist: how can I prevent these?

Thanks in advance.

Posted: Thu Jul 08, 2010 1:43 pm
by Shiru
16-bit integers should be fastest.

I think it is not easy to make a memory leak without dynamic memory allocation (there is no alloc/free).

Posted: Thu Jul 08, 2010 1:50 pm
by Jaklub
Shiru wrote:16-bit integers should be fastest.

I think it is not easy to make a memory leak without dynamic memory allocation (there is no alloc/free).
I must have used a wrong pharse, but it seems sometimes I get memory overwriting - some values are changed even though they shouldn't be.

Posted: Thu Jul 08, 2010 1:59 pm
by Shiru
Then watch for your pointers and array indexes very carefully. You can use some debug code to check if they are correct.

Posted: Thu Jul 08, 2010 2:03 pm
by Jaklub
Shiru wrote:Then watch for your pointers and array indexes very carefully. You can use some debug code to check if they are correct.
I'm such a fool, got to check my arrays more often. :o Thanks for info.