This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28377D: 三角函数运行时时间

Part Number: TMS320F28377D


你好。

针对sin,sinf有做测试。发现sin函数时间花费非常久。例如运行如下代码

代码:


    int i = 0;
    for(i = 0 ; i < 10 ; i++)
    {
        test_buff[i] = sin(i);//sinf(i)
    }

CPU时钟200M,10组计算下来 55000个时钟周期,每计算一个sin将近5500个周期 ,

但是用sinf,时间会减少很多,10组计算下来只要1048个周期,每计算一个sinf只需要100个周期。

请问问题可能出现在哪里?