help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Random timing results with 'fsolve'


From: Søren Hauberg
Subject: Re: Random timing results with 'fsolve'
Date: Wed, 12 Oct 2011 16:05:55 +0200

ons, 12 10 2011 kl. 16:02 +0200, skrev Martin Helm:
> Am Mittwoch, den 12.10.2011, 15:41 +0200 schrieb Søren Hauberg: 
> > Hi All
> > 
> > I am currently using 'fsolve' to solve a non-linear set of equations,
> > for which it works great. However, when I try to determine the running
> > time of the algorithm I get rather different results. I tried
> > 
> >   for idx = 1:10
> >     tic, [a1, b1] = fsolve (g, x, struct ("Jacobian", "off")); tid (idx)
> > = toc;
> >   endfor
> > 
> > i.e. run the solver ten times with the same input and store running
> > times. After this I see
> > 
> >   octave:313> max (tid_off) / min (tid_off)
> >   ans =  4.2706
> > 
> > Does anybody know why I see so large differences in the timing results?
> > 
> > Søren
> > 
> You check the "real" time it takes, if something runs in the background
> this will interfere with your time measurement.
> 
> Do you get the same randomness when you are using cputime instead?

Good point. I just tried cputime instead and I get the same
randomness :-(

Søren



reply via email to

[Prev in Thread] Current Thread [Next in Thread]