could still preallocate and grow as needed?
On Thursday, 21 July 2016 02:48:58 UTC+1, Chris Rackauckas wrote: > > Most of the arrays are changing size each time though, since they > represent a population which changes each timestep. > > On Wednesday, July 20, 2016 at 6:47:39 PM UTC-7, Steven G. Johnson wrote: >> >> It looks like you are allocating lots of arrays in your doStep inner-loop >> function, so I'm sure you could improve it by moving the allocations out of >> the inner loop. (In general, vectorized routines are convenient but they >> aren't the fastest way to do things.) >> >