[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: speed of octave interpreter
From: |
Paul Kienzle |
Subject: |
Re: speed of octave interpreter |
Date: |
Sun, 25 Sep 2005 21:28:58 -0400 |
[redirected to maintainers list]
I'm pretty sure we don't want to reload a function definition
haphazardly during a long running computation.
Maybe should only check the timestamp at a few select points, such as
the first function call after input() or after returning to the top
level, and provide the user with some way to force it?
To be more specific, something like the following:
try_reload(function)
if nargin > 0
if function.timestamp > function.loadtime
function.reload()
function.loadtime = now()
else
global reset_time
reset_time = now()
endif
feval()
...
global reset_time
if function.loadtime < reset_time && function.timestamp >
function.loadtime
function.reload()
function.loadtime = now()
endif
...
Then input() and top_level() would have calls to try_reload(), and the
user could call try_reload(fn) to check if a specific function has
changed, or try_reload() to check everything. A GUI event loop would
probably also call try_reload() whenever it goes idle.
Sorry, no patch.
- Paul
On Sep 25, 2005, at 7:58 PM, Brian Blais wrote:
Stefan van der Walt wrote:
On Sun, Sep 25, 2005 at 01:35:23PM -0400, Brian Blais wrote:
I am running Octave (2.1.71) on Linux (SuSe 9.1), and have written a
simple recursive minimax example for a class, and it seemed to run
very
slowly. So, on a whim, I decided to test it in Scilab 3.0, Matlab
7.0
Since you are dabbling with the murky art of recursion, you probably
want to set
ignore_function_time_stamp = "all"
Holy smokes! What a difference!
ignore_function_time_stamp = "system";
tic; nim_minimax(15); toc
ans = 56.552
ignore_function_time_stamp = "all";
tic; nim_minimax(15); toc
ans = 1.4262
thanks,
bb
--
-----------------
address@hidden
http://web.bryant.edu/~bblais
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- Re: speed of octave interpreter,
Paul Kienzle <=