help-octave
[Top][All Lists]
Advanced

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

RE: trying to optimize my octave program


From: Tim Rueth
Subject: RE: trying to optimize my octave program
Date: Wed, 17 Mar 2010 12:42:41 -0700

Good questions.  Since toc only goes down to a resolution of 0.01 sec, and
the inner-most loop takes something less than 0.01 sec (tic is first
instruction in the loop, and toc is the last instruction in the loop), it's
hard to see how much overhead is associated with looping/interpreter because
I don't have enough resolution here.  Since very little time is spent inside
this loop, I'm guessing not much is to be gained by compiling function
containing this loop, unless the for-loop construct itself can be executed
much faster in C versus interpreted in Octave.

As for whether I'm hitting swap space, I think I'm okay.  Here's what my
Vista Task Manager says when I'm running my Octave program:

Physical Memory (MB):
Total = 4094
Cached = 2673
Free = 60

Kernel Memory (MB):
Total = 412
Paged = 308
Nonpaged = 103

--Tim


-----Original Message-----
From: Judd Storrs [mailto:address@hidden 
Sent: Wednesday, March 17, 2010 12:22 PM
To: address@hidden
Cc: address@hidden
Subject: Re: trying to optimize my octave program

On Wed, Mar 17, 2010 at 2:41 PM, Tim Rueth <address@hidden> wrote:
> Each iteration in this inner-most loop currently takes much less than 
> 0.01 sec, so I question whether compiling the function that contains 
> this loop will help much.

Have you tried to guestimate how much overhead can be attributed to
looping/interpreter overhead? i.e. multiply the inner loop's 0.01sec times
how many times it must be executed? How does that compare to the actual
runtime? Are you hitting swap space?


--judd



reply via email to

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