[R] Windows 2x faster than linux x86_64?

Uwe Ligges ligges at statistik.tu-dortmund.de
Fri Sep 4 11:29:21 CEST 2009



thomas.davidoff at sauder.ubc.ca wrote:
> I did a speed test with a colleague.  We basically have identical Lenovo
> ThinkCentres.  He has 8 vs my 4 G RAM, but I don't think that's the
> issue.
> 
> code:
> length <- 2*10^6
> a <- runif(length)
> b <- runif(length)
> print(summary(lm(a~b)))
> 
> Running Arch x86_64 this takes about 16 to 17 seconds.  I *think* I have
> compiled arch=i686  and arch=x86_64 with little speed difference.
> 
> On windows, this takes 7 to 8 seconds.


It takes between 17 and 21 seconds on a 64-bit Linux and a 64-bit 
Windows (with 32-bit R) for me. There may be a small benefit for some 
OS/compiler or whatever reason, but in this case:

For your Windows, I guess an optimized (or maybe even parallel?) BLAS is 
used while this has not been used for the Linux version. Right? I'd be 
surprised about any machine that can solve the problem without optimized 
BLAS in less than 10 seconds.

Best wishes,
Uwe Ligges





> Thoughts?
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list