Optimising code

support for the ARM toolchain
Post Reply
HeavyDude
Posts: 14
Joined: Sun Oct 31, 2010 12:55 pm

Optimising code

Post by HeavyDude » Fri Jul 29, 2011 2:38 pm

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?

elhobbs
Posts: 358
Joined: Thu Jul 02, 2009 1:19 pm

Re: Optimising code

Post by elhobbs » Fri Jul 29, 2011 3:20 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests