[Scilab-users] Logical zero

Jan-Åge Langeland j-lan at online.no
Mon Feb 1 14:40:48 CET 2016


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20160201/33d34ded/attachment.htm>


More information about the users mailing list