Hello,
In comparing the following scripts, the matrix operations are much more 
time-consuming tasks. Is such a behaviour normal ? I was under the 
understanding that handling matrices is quicker than operations on 
series. :-[

cheers,
artur

nulldata 10000
series x = normal()

series example = 0
loop for i = 1..$nobs --quiet
     example[i] = x[i]
endloop

matrix example2 = zeros($nobs,1)
loop for i = 1..$nobs --quiet
     example2[i,1] = x[i]
endloop


-- 
Artur BALA
development economist, consultant

phone:  +216 22 99 73 44
skype:  artur.bala.tn
email:  artur.bala.tn(a)gmail.com
*********************************


Hello,
In comparing the following scripts, the matrix operations are much more time-consuming tasks. Is such a behaviour normal ? I was under the understanding that handling matrices is quicker than operations on series. :-[

cheers,
artur

nulldata 10000
series x = normal()

series example = 0
loop for i = 1..$nobs --quiet
    example[i] = x[i]
endloop

matrix example2 = zeros($nobs,1)
loop for i = 1..$nobs --quiet
    example2[i,1] = x[i]
endloop



-- 
Artur BALA
development economist, consultant

phone:	+216 22 99 73 44
skype:	artur.bala.tn
email:	artur.bala...@gmail.com
*********************************

Reply via email to