Page 1 of 1

Optimising code

Posted: Fri Jul 29, 2011 2:38 pm
by HeavyDude
When writing for the DS what are the main things to avoid to ensure as the code is fast as possible?

For example I've heard that ARM doesn't like multiplying and dividing so is '<<' (i.e. z=x<<2;) a problem?

Re: Optimising code

Posted: Fri Jul 29, 2011 3:20 pm
by elhobbs
probably the only thing worth worrying about is avoiding floats if you think you will need to use them intensively - use fixed point if you can. just like on any platform optimize the parts that are slow - and you will not be able to tell until you measure performance once you have something running. try to use the hardware sprites or 3d - trying to refresh the entire framebuffer manually each frame usually does not work all that well.