help-octave
[Top][All Lists]
Advanced

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

Re: Octave compared to Matlab


From: Mario Storti
Subject: Re: Octave compared to Matlab
Date: Fri, 14 Aug 1998 08:47:52 -0300

Here is what Octave does when you call a function file

(From the Octave manual: File: octave.info,  Node: Function Files)
>     When Octave defines a function from a function file, it saves the
> full name of the file it read and the time stamp on the file.  After
> that, it checks the time stamp on the file every time it needs the
> function.  If the time stamp indicates that the file has changed since
> the last time it was read, Octave reads it again.

So that the function is compiled only once. Even more you can avoid the
time spent in checking the time stamp of the file with the
configuration variable `ignore_function_time_stamp'.

(From the Octave manual: File: octave.info,  Node: Function Files)
>    If you know that your own function files will not change while you
> are running Octave, you can improve performance by setting the variable
> `ignore_function_time_stamp' to `"all"', so that Octave will ignore the
> time stamps for all function files.  Setting it to `"system"' gives the
> default behavior.  If you set it to anything else, Octave will check
> the time stamps on all function files.

I never used it. I think that it should be used with care. Perhaps
inside some construct try-catch-end_try_catch (see the command try). 

Regards

Mario

%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%
Mario Alberto Storti                           | Fax: (54)(42) 55.09.44 |
Centro Internacional de Metodos Computacionales| Tel: (54)(42) 55.91.75 |
  en Ingenieria - CIMEC (INTEC/CONICET-UNL)    |........................|  
INTEC, Guemes 3450 - 3000 Santa Fe, Argentina                           |
Reply: address@hidden, http://venus.unl.edu.ar/gtm-eng.html |


>>>>> On Fri, 14 Aug 1998 10:49:30 +0200 (MET DST), 
>>>>>      Peter Waller <address@hidden> said:

> I have used MatLab for some years now and it has been a challenge to avoid
> loops.
> eg.
> for k=1:Nbr
>   k(1,k)=testfunction(k);
> end;

> If this loop is run in matlab then 'testfunction' is compiled for every
> 'k'.
>> From the octave manual I have understood that octave compiles every
> function before executing it. 
> Does this mean that 'testfunction' is only compiled once during the loop? 

> How does octave compile, is the code optimized?

> I would like to thank Mario Storti for his answer on my vector problem, it
> is great to have an email list like this!

> /Peter Waller



reply via email to

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