speed of Scilab 5.3.2 vs Scilab 5.3.1

Ginters Bušs ginters.buss at gmail.com
Wed Jul 20 10:23:52 CEST 2011


Hi,

Just to let you know:
I just found out that version 5.3.2. runs faster than 5.3.1.

Say, this code:

tic()
sigeta=2; sigeps=1;
mi=[]; c=[]; y=[]; skait=[]; sauc2=[]; rho=[];
f1=1.2; f2=-0.5;
n=102000; k=2000;
c=grand(n,1,'nor',0,sigeta);
c(2)=f1*c(1)+c(2);
mi=grand(n,1,'nor',0,sigeps);
for i=3:n;
    c(i)=c(i)+f1*c(i-1)+f2*c(i-2);
end
for i=2:n;
    mi(i)=mi(i)+mi(i-1);
end
y=c+mi;
y(1:k)=[];
c(1:k)=[];
i=1:length(y);
skait=sum((y(i)-mean(y)).*(c(i)-mean(c)));
sauc2=sum((y(i)-mean(y))^2)*sum((c(i)-mean(c))^2);
rho=skait/sqrt(sauc2)
toc()

takes approx. 1.75sec. (on my PC) on Scilab 5.3.2, while approx. 6 sec. on
Scilab 5.3.1.

Gin.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20110720/1610e7a4/attachment.htm>


More information about the users mailing list