help-octave
[Top][All Lists]
Advanced

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

Loops resource usage.


From: Muthiah Annamalai
Subject: Loops resource usage.
Date: Thu, 21 Jun 2007 15:18:26 -0500

Hello there,

I wanted to ask if there is a difference between writing a program like

for x=linspace(-pi:+pi,Npts)
   [X,Y,Z,L,M,N]=init_variables();
   do_a_time_consuming_long_computation();
 
  %clear the memory used
 
   clear all
end

% and this function?

for x=linspace(-pi:+pi,Npts)
   [X,Y,Z,L,M,N]=init_variables();
   do_a_time_consuming_long_computation();
end


My advisor told me, it saves something and does better in long programs.
Thanks in advance.

Thanks,
Muthu
PS: I couldnt find anything useful on this topic, in a Gmane search

reply via email to

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