Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.


dpb
Posts:
9,537
Registered:
6/7/07


Re: growdata and growdata2  mathworks problem, still ?
Posted:
Oct 23, 2012 9:42 AM


On 10/23/2012 8:25 AM, someone wrote: > Hi, > > This is from 2007: > > http://www.mathworks.com/matlabcentral/fileexchange/8334 > > > Is it still necessary/advisable/required to do something like "growdata" > if you want a speed increase and have (very) long increasing arrays ? > > Or did Mathworks see this problem and fixed the problem by using a > clever compiler that automatically optimizes its way out of this problem? ...
My suggestion if you can't figure out how to preallocate is "try it and see".
Better JIT compilation can fix many things but poor coding practice or algorithms that require much general rearranging of the source code to handle memory allocation (and particularly _re_allocation aren't likely to be solvable that way.




