octave-maintainers
[Top][All Lists]
Advanced

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

RE: Fwd: [Bug c++/14563] octave built under Cygwin very slow]


From: Bill Denney
Subject: RE: Fwd: [Bug c++/14563] octave built under Cygwin very slow]
Date: Tue, 9 Aug 2005 16:46:46 -0400 (EDT)

On Tue, 9 Aug 2005, James R. Phillips wrote:

Also, (speculation alert) preallocating arrays in your m-file coding might avoid repetitive calls in octave to new/delete, which are apparently a large part of the compiler problem.

I'm 99% sure that this helps in both octave and matlab. It doesn't have to reallocate memory which becomes more difficult when the allocation is trying to keep memory from being fragmented and it has to search for a larger block of space free.

I've actually had code in matlab that would run out of memory unless I pre-allocated one particularly large array (it was using about 512M of 1G of my RAM).

Bill

--
"Instead of torturing the on-air talent, torture kittens. While not
eliminating pledge drives, this would significantly shorten their length.
'Okay, we have 10 callers on the line. It looks like Fluffy gets a little
breather.'"  -- NPR Fund-Raising Alternative (www.netfunny.com)



reply via email to

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