After switching to OpenBLAS results became the same for zero- and non-zero-matrices. For example, for R and Z of size (1000, 2000) results are as follows:
julia> @time for i=1:10 A*R end elapsed time: 1.733125403 seconds (320001120 bytes allocated, 6.63% gc time) julia> @time for i=1:10 A*Z end elapsed time: 1.859967006 seconds (320001120 bytes allocated, 6.33% gc time) Pretty stable now. Thanks for your help! On Thursday, July 17, 2014 6:00:57 PM UTC+3, Andrei Zh wrote: > > Ok, OpenBLAS wasn't installed on this laptop, after installing > Base.blas_vendor() changeI d. I'll repeat my tests in evening and port > results. > > On Thursday, July 17, 2014 5:47:44 PM UTC+3, Andrei Zh wrote: >> >> @Tim: seems like that - Base.blas_vendor() returns :unknown, while >> Base.libblas_name equals "libblas.so.3". Is there a way to switch to >> OpenBLAS? >> >> >> On Thursday, July 17, 2014 5:21:24 PM UTC+3, Tim Holy wrote: >>> >>> I get this: >>> >>> julia> @time for i = 1:10 A*R end >>> elapsed time: 7.428557846 seconds (320001120 bytes allocated, 1.43% gc >>> time) >>> >>> julia> @time for i = 1:10 A*Z end >>> elapsed time: 7.233144631 seconds (320001120 bytes allocated, 1.46% gc >>> time) >>> >>> No difference. >>> >>> Are you using a different BLAS than OpenBLAS? >>> >>> --Tim >>> >>> On Thursday, July 17, 2014 07:16:46 AM Andrei Zh wrote: >>> > Only 2 times faster. But for A = rand(2000, 1000); R = rand(1000, >>> 2000) and >>> > Z = zeros() we have: >>> > >>> > julia> @time for i=1:10 A * R end >>> > elapsed time: 32.497353017 seconds (320001120 bytes allocated, 0.43% >>> gc >>> > time) >>> > >>> > julia> @time for i=1:10 A * Z end >>> > elapsed time: 0.209265586 seconds (320001120 bytes allocated, 70.28% >>> gc >>> > time) >>> > >>> > 155 times faster! >>> >>>
