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.
Hello, I am trying to embeed a synchronous machine simulator in a F28M35H52C1 Concerto Microcontroller using C language. It is supposed to be a real time simulator so execution time is important. Regarding this, I have some doubts about how mathematical expressions are "translated" into assembler. For example, this is an actual sentence of my code:
*(*(A + k1) + k2) = (-(b + i)->p_coef[0] * sq_module_u + ((b + i)->p_coef[0] * (b + i)->u_i - (b + i)->q_coef[0] * (b + i)->u_r) * 2 * (b + i)->u_i) / sq_sq_module_u + (-(b + i)->p_coef[1] * module_u + ((b + i)->p_coef[1] * (b + i)->u_i - (b + i)->q_coef[1] * (b + i)->u_r) * (b + i)->u_i / module_u) / sq_module_u - (b + i)->p_coef[2];
It does not annoy me such a long expression but, could it decrease the program performance somehow? Should I split the line into other shorter ones? I do not know if it is useful to say so but I am using 32 bits floats and the FPU.
Thanks in advance.