I ran a little speed test with the different alternatives, I found the results surprising:

Jan

//script ftest.sce m=10000 n=10000 v=ver(); disp(v(1,1:2)); clear a; timer(); a = zeros(n, m) == 1; //best in Scilab 6.0.0 disp(timer()); clear a; timer(); a=zeros(n,m)>0; disp(timer()); clear a; timer(); a=%f(ones(n,m)); disp(timer()); clear a; timer(); a(1:n,1:m)=%f; //best in Scilab 5.5.1 disp(timer()); clear a; //end script ftest.sce -->exec('ftest.sce',-1) !Scilab Version: 5.5.1.1412169962 ! 1.4820095000000037543941 1.372808800000029805233 0.5304033999999546722393 0.2964018999999780135113 -->exec('ftest.sce',-1) !Scilab Version: 6.0.0.1447231131 ! 0.6708043 1.3260085 2.7300175 3.3228213

_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users

Reply via email to