Sep 04, 2019
07:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 04, 2019
07:14 PM
I tested the computation performances for float and double on TriCore297, I obtained a strange result, they are so similar.
I let TC297 run dotproduct for float and double, and the length of vector are both 128, executed for 1000 times.
Then, I caculate cycle-count through IfxCpu_resetAndStartCounters and IfxCpu_stopCounters.
At last, I found their performance(cycle count) are very similar!
TC297 just have single-float co-operator, so, the single-float's compuation should be faster than double's computation.
It is so strange, Why?
Is there any one would tell me the reason?
I let TC297 run dotproduct for float and double, and the length of vector are both 128, executed for 1000 times.
Then, I caculate cycle-count through IfxCpu_resetAndStartCounters and IfxCpu_stopCounters.
At last, I found their performance(cycle count) are very similar!
TC297 just have single-float co-operator, so, the single-float's compuation should be faster than double's computation.
It is so strange, Why?
Is there any one would tell me the reason?
- Tags:
- IFX
4 Replies
Sep 05, 2019
12:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 05, 2019
12:10 AM
Hi Shaquille,
Did you look at the disassembly (tricore-objdump) to see if the disassembly for doubles indeed utilises the FPU, or if perhaps it still makes calls (for currently unknown reasons) to floating point libraries instead. Mind you, you write that the results are almost identical, which suggests that the project settings are effective, but perhaps with less change than you expected.
Best regards,
Henk-Piet Glas
Principal Technical Specialist
Embedded Software
Sep 05, 2019
06:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 05, 2019
06:13 AM
My mistake, I forgot to turn off the option -fshort_double
Their difference is obvious after I removing this option
Their difference is obvious after I removing this option
Sep 05, 2019
07:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 05, 2019
07:56 AM
Cheers Shaquille,
Thanks for letting us know. Happy developing.
Best regards,
Henk-Piet Glas
Principal Technical Specialist
Embedded Software
Dec 06, 2019
03:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 06, 2019
03:30 AM
Could you share your result for floating point and double?