Floats, more and more...
I have redone my profiler.
First I have redone mi counter, now I have I new one that i have tested with the ds clock an synchronization is perfect :D. The new timer now can give me more info about the time passed since the last time I called him.
I have deleted also that aditions i made to avoid compiler optimizations. I could so this changing my ints data to volatile.
So, for any operation the basic code is:
counter->Reset();
for(int i = 0; i < NUM_OPS; ++i)
{
c = a * b;
}
printf("MUL32: %d %d\n", counter->GetTimeSinceLastCall(), c);
More simple, as you can see. I have tested again all the previous operations and these are the results (remember NUM_OPS = 5000000):
- Multiplications: 671 ms
- Multiplications with mulf32: 896 ms
- Divisions: 2163 ms
- Divisions with divf32: 16265 ms
- 64 bits multiplications: 672 ms
- 64 bits divisions: 15817 ms
- Square roots: 8207 ms
Floats operations:
- Multiplications: 3208 ms
- Divisions: 10297 ms
I hope it will be useful fore somebody
First I have redone mi counter, now I have I new one that i have tested with the ds clock an synchronization is perfect :D. The new timer now can give me more info about the time passed since the last time I called him.
I have deleted also that aditions i made to avoid compiler optimizations. I could so this changing my ints data to volatile.
So, for any operation the basic code is:
counter->Reset();
for(int i = 0; i < NUM_OPS; ++i)
{
c = a * b;
}
printf("MUL32: %d %d\n", counter->GetTimeSinceLastCall(), c);
More simple, as you can see. I have tested again all the previous operations and these are the results (remember NUM_OPS = 5000000):
- Multiplications: 671 ms
- Multiplications with mulf32: 896 ms
- Divisions: 2163 ms
- Divisions with divf32: 16265 ms
- 64 bits multiplications: 672 ms
- 64 bits divisions: 15817 ms
- Square roots: 8207 ms
Floats operations:
- Multiplications: 3208 ms
- Divisions: 10297 ms
I hope it will be useful fore somebody
0 Comments:
Post a Comment
<< Home