Banner_AURIX_Security-Solution Banner_AURIX_Security-Solution Banner_AURIX_Security-Solution Banner_AURIX_Security-Solution


+ Reply to Thread
Results 1 to 4 of 4

Thread: Performance Comparison between single-float and double

  1. #1
    Beginner Beginner icework is on a distinguished road
    Join Date
    Sep 2019
    Posts
    16
    Points
    135

    Performance Comparison between single-float and double

    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?

  2. #2
    Advanced Advanced HIGHTEC.henk-piet.glas is on a distinguished road
    Join Date
    May 2017
    Posts
    128
    Points
    2527.5

    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

  3. #3
    Beginner Beginner icework is on a distinguished road
    Join Date
    Sep 2019
    Posts
    16
    Points
    135
    My mistake, I forgot to turn off the option -fshort_double
    Their difference is obvious after I removing this option

  4. #4
    Advanced Advanced HIGHTEC.henk-piet.glas is on a distinguished road
    Join Date
    May 2017
    Posts
    128
    Points
    2527.5

    Cheers Shaquille,

    Thanks for letting us know. Happy developing.

    Best regards,

    Henk-Piet Glas

    Principal Technical Specialist
    Embedded Software

+ Reply to Thread
Disclaimer

All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.


Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.


Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.