[R] Computation time differences between Linux and Windows
Mpiktas
mpiktas at delfi.lt
Mon Dec 2 13:40:08 CET 2002
Hi,
Today I came accros a very interesting thing. I was asked how much time
it takes for R to calculate the product of two large matrices. So I
generated two 2000x2000 matrices of random normal numbers and measured
the time with function system.time
m1 <- matrix(rnorm(2000*2000),2000)
m2 <- matrix(rnorm(2000*2000),2000)
system.time(m3 <- m1%*%m2)
and it produced
46.47 0.36 47.68 0.00 0.00
on Debian GNU/Linux Woody, R 1.6.1 computer. The same three lines on the
same computer but under Windows 2000 and R 1.5.1 I got
550.23 0.40 552.97 NA NA
So to calculate the product of two matrices it takes approximately 10
times more on Windows than on Linux.
Is this a bug or a feature?
The same operation in Matlab 5.3 on Windows 2000 took approximately 300
seconds and in Octave 2.0.16.92 (i386-pc-linux-gnu) on Linux about 550
seconds. I tried to keep minimum processes running during the
computations.
I suspect the answer to this is different memory management accros
different programs and platforms. Am I right?
Thanks for any help
Sincerely,
Vaidotas Zemlys
More information about the R-help
mailing list