I am have a lot of code that I need to optimize and make it run faster. I used opreport to tell me where the code spends a lot of time. I use the following command to get the statistics
opreport -g -l -d
Suggestions to get better statistics are appreciated using different flags, perhaps find it per line number instead of function number.
So a lot of issues that I "think" I see are in regard to:
- pointers, multidimensional arrays
- multiplications
- loops
I want compiler to optimize the code better, thus helping him. I factored some code blocks into function with word restrict to tell compiler that my pointer arrays don't overlap.
SO I am I am looking for (a) common C constructs that can make code run longer and (b) how to help compiler optimize code.
Thanks