optimisation

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

Post Reply
Jaklub
Interested
Posts: 41
Joined: Mon Aug 24, 2009 1:36 pm

optimisation

Post 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.
Last edited by Jaklub on Thu Jul 08, 2010 1:52 pm, edited 2 times in total.
Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post 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).
Jaklub
Interested
Posts: 41
Joined: Mon Aug 24, 2009 1:36 pm

Post 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.
Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru »

Then watch for your pointers and array indexes very carefully. You can use some debug code to check if they are correct.
Jaklub
Interested
Posts: 41
Joined: Mon Aug 24, 2009 1:36 pm

Post 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.
Post Reply