Search the web
Sign In
New User? Sign Up
gbadev
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
slow instructions on GBA   Message List  
Reply | Forward Message #12324 of 15019 |
Re: [gbadev] slow instructions on GBA

On 2 Aug 2002 at 13:41, Szabo Ferenc wrote:

> Hi,
>
> As I know, the modulo (x%y) and division (x/y) instructions are fairly slow on
GBA.
> Are there any other instructions or program sequences to avoid on GBA
(especially in Vblan kinterrupt)?
> If yes, do you know alternative methods (like bit shifting to increase the
speed of multiplying by 2,4,8...) for them?
Square root. I think on devrs.com there's a link to page with tricks for fast
sqrt. Frankly saying for the present I'm using the BIOS one, but now I wonder --
did anyone make
any tests if it's faster than hand-optimized routines?

--
- Maciej Sinilo








Fri Aug 2, 2002 12:00 pm

yarpen2002
Offline Offline
Send Email Send Email

Forward
Message #12324 of 15019 |
Expand Messages Author Sort by Date

Hi, As I know, the modulo (x%y) and division (x/y) instructions are fairly slow on GBA. Are there any other instructions or program sequences to avoid on GBA...
Szabo Ferenc
szabfer
Offline Send Email
Aug 2, 2002
11:54 am

... Square root. I think on devrs.com there's a link to page with tricks for fast sqrt. Frankly saying for the present I'm using the BIOS one, but now I wonder...
Maciej Sinilo
yarpen2002
Offline Send Email
Aug 2, 2002
12:25 pm

... slow on GBA. Modulo and division are relatively slow on the AGB as it has no hardware divide unit, however they are not so slow they are going to screw up ...
James Boulton
jim@...
Send Email
Aug 2, 2002
12:37 pm

On 2 Aug 2002 at 13:15, James Boulton wrote: [snip] ... That's a very good advice. After all, as we all know, "premature optimization is the root of all evil"...
Maciej Sinilo
yarpen2002
Offline Send Email
Aug 2, 2002
12:46 pm

... if you use GCC, here something else to be aware of: another major slowdown/bloat thing is using u8/s8/u16/s16 when don't HAVE to use them... if you don't...
Markus Glanzer
vampy2000.geo
Offline Send Email
Aug 2, 2002
12:52 pm

it is exactly the same for parameters in functions: void f(u32) {} is better than f(u16) {} for the same reasons. Christian VOTAVA Responsable du...
Christian Votava
cvotava@...
Send Email
Aug 2, 2002
2:54 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help