I am starting to hate this XDDDD
This morning I realized that I haven't done some floats operations and get their times. Everybody in forums when you talk about floats says:"Nooooo, atay away from them. Fixed point, fixed point!!"
I have added to yesterady's program a multiplication and a division with float numbers.
Basically the coded added is like this
float fa = 1000000000.0f;
float fb = 0.0000000001f;
float fc;
counter->Reset();
int t8 = 0;
for(int i = 0; i < NUM_OPS; ++i)
{
fc = fa++ * fb++;
t8 += counter->GetTimeSinceLastCall();
}
printf("FMUL T8: %d %f\n", t8, fc);
counter->Reset();
int t9 = 0;
for(int i = 0; i < NUM_OPS; ++i)
{
fc = fa++ / fb++;
t9 += counter->GetTimeSinceLastCall();
}
printf("FDIV T9: %d %f", t9, fc);
And... the results obtained are
FMUL 11446ms
FDIV 18619ms
Strange isn't it? Personally I was expecting something else... I mean... fixed point is a pain in the neck and there is always problems with them (that annoying overflow is not the only one). For multiplications the time increases until 3 times with fixed point but wiht divs... it takes less time??
With these results... I don't know what to do :P Should I use floats or use fixed point? Should I continue wasting my time on a FP class? I think that I am going to ask in any for... I mean, I am going to investigate a little bit
Yo must use fixed point, forgot the floats. The fixed points are very fast and more easy to use.
ReplyDeleteI hope that u understand any part of this comment XDD, my english is very bad :(
Salu2
Yeah, I understand you... my english is not for throwing rockets XDDDDDD
ReplyDeleteYou still think I should use them? Based on the obtained results...
Well, wait for tomorrow's post. I've got something new ^_^
Forget about fixed/floating point and USE THE FORCE, Luke !!! xD
ReplyDeleteListen to Xamar, The Force Will Be With You!!!!
ReplyDeleteUse only "int", and so you can throw rockets XDDD
Salu2
Uhmmm the ds dont have a Float unit??? why dont use?? XD
ReplyDeletemy english is the worse of 3 jaajaj
The DS doesn't support floats by hardware but arm compiler creates code for them.
ReplyDeleteThe thing is that sometimes the code created for fixed point is slower than the one created for floats