[R-SIG-Mac] Multi-thread R processes performance on 8-core Mac-Pro

Marra, David David.Marra at ATKEARNEY.com
Fri Apr 20 04:46:48 CEST 2007

Thank you to everyone who contributed to understanding the multi-core
problem better. I took Elijah's advice and purchased a Leopard
pre-release DVD and will post performance results here when it arrives
and if the results are interesting (should be!). I'll also post the
result from Simon's BLAS test in a few hours.

In the meantime, there is a speed problem to solve. Appreciate advice
anyone may have on potential approaches for speeding up the following
function. Based on previous comments, fewer calls to memory may be

results <- function(x){
fit <- lm(Y ~
list(R2=summary(fit)$adj.r.squared) }

This call to lm function is nested in a parSapply function that iterates
down the rows of the "cmb" matrix. Each row of cmb has, in the example
above, 5 character values (such as "var1", "var2",..."var5")
corresponding to variable names in the "data1" dataframe. The function
iterates down the rows, generating regressions, each with a different
combination of variables. (x just goes from 1 to whatever number of rows
are in cmb.) Finally the function delivers the R2 for each combination.

Any speed-up ideas?


More information about the R-SIG-Mac mailing list