Thanks @Stefan ...  

On Tuesday, October 18, 2016 at 8:03:46 PM UTC+3:30, zamani.m...@gmail.com 
wrote:
>
> hi guys
> is there a way to reduce allocated memory in matrix multiplications?
>
> for example this code blew in my machine gives :
>
> function test4(n)
>   a = rand(n,n)
>   for i = 1:100
>      a*a
>    end
>  end
>
>
> ---------------------- answer  ----------------------
> test4(1)
> # force compiling 
>
> @time test4(1000)
> 16.589743 seconds (433 allocations: 770.587 MB, 0.68% gc time)
>

Reply via email to