trigonometry - Code motion optimization of trigonometric function[cos(\theta)] -


As we know trigonometry functions take more CPU cycles if we want to reduce the CPU cycle, Need to implement optimization.

I have such code:

 for  (i = 0; i & lt; n; i ++) {for (j = i + 1; j & Lt; n; j ++) {Val1 = Some values ​​after calculation val2 = cos (val1); }}  

I now need to optimize (especially code speed optimization) function (KOS), so that it can take a lower CPU cycle.

Hint: We can use two arrays of size

result The result for the desired precision is the fastest way to use the precompute and lookup table.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -