Executable startup/run time



Hi,

I have made a executable of my function in Matlab using the
mcc command. This function reads from a file and writes a
result to a another file depending on the command line
options. At the begin and end of this function I have placed
the tic/toc commands to measure the execution time.

The first problem:
When the m-file is executed from Matlab, the elapsed tic/toc
time is 0.35 seconds. When I run the Matlab Executable, the
elapsed tic/toc time is 1.36 seconds.
Can anyone tell where this difference comes from and how it
can be reduced?

The second problem:
When I measure the whole execution time of the Matlab
Executable by hand, so from executing the command until the
function is ready, this takes about 5 seconds! It seems to
me that the MCR needs some ‘startup’ time.
Since I want to run the executable several times, I would
like to know if there is a possibility to reduce this
‘startup’ time. Is there a way to keep the MCR running, or
something like that?

Thanks in advance,

Robert

P.S.: Matlab version R2006a

.



Relevant Pages

  • Re: image processing- changing location of selected point
    ... That code segment executes correctly for me in MATLAB R2009b. ... This change is necessary because the class of impoint was changed to an "impoint" object, where it used to be an hggroup. ... Do you require that MATLAB execution is blocked until you have correctly positioned a point? ...
    (comp.soft-sys.matlab)
  • Re: Stopping m file execution without exitting Matlab
    ... stop execution and return to command prompt. ... I want Matlab to handle this stopping business automatically without me ...
    (comp.soft-sys.matlab)
  • Matlab is "busy" ??
    ... I have a question which is so important for my matlab career:) ... When you type a command that need more executaion, ... never says "Busy" althought it requires more execution time. ...
    (comp.soft-sys.matlab)
  • Disabling runtime warnings for standalone executables
    ... I'm using Matlab R14SP3 to compile a standalone executable on Linux. ... Warning: Unable to open display, ... biggie, though, since it only appears the first time the execution is ...
    (comp.soft-sys.matlab)
  • Re: mex vs. exe file execution time
    ... this routine has small variances in terms of execution time. ... what's going on in the background of Matlab or how Matlab operates ... other being an Ndim x m3 matrix by m3 x Ndim matrix. ... mex file in Matlab rather than as a stand-alone executable. ...
    (comp.soft-sys.matlab)