调用了自带的mathlib库,感觉并没有快多少啊……
用循环一万次的方法测试了一下,平均计算一次sin或者cos要接近100ns,这有点太慢了吧。
是我用的方法不对吗?请教一下,大家平常是用什么方法计算三角函数的?
十分感谢!
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.
感觉这个调用的cycle数有点大了, 你确定测试的方法没有问题么?
使用的是单精度,还是双精度的浮点?