|
I am running MATLAB R2008b.
I have a MEX-function, calc_E, which runs 499500 times in a loop. This function is called in a statement in an M-function, 'E = calc_E(D)'.
The problem is, according to the profiler, calc_E itself took 3.383 s to execute, but the statement 'E = calc_E(D)' took 11.539 s. I tried running the profiler with -detail builtin (R2008b doesnt allow any further than this), but it didn't reveal anything more. Considering that this statement is the rate determining step in my program, it is important that I optimize it.
What is the cause of this extra overhead and how do I eliminate it?
|