At a glance, why build list only to just add it to J? Why not add it 
directly to J, and add i to I.

If I have a chance I'll look further.

Which Julia?

On Monday, October 6, 2014 1:51:36 PM UTC-4, Andrei Berceanu wrote:
>
> I have written the following Julia code to build a sparse matrix of 
> dimension N^2xN^2
>
> https://gist.github.com/berceanu/fe7e26840637517383d8
>
> The code works (probably in a very suboptimal way) for small enough 
> matrices, but for example if I set N=1000, genspmat(1000) quickly eats up 
> my RAM and crashes Julia. I doubt that this is related to the storage of 
> the sparse matrix itself, and suspect it has to do with the garbage 
> collection inside the main loop of genspmat, but I have no idea of fixing 
> it. Any suggestions?
>
> Thanks!
>

Reply via email to