Skip to content
Prev 1491 / 2152 Next

Problems parallelizing glmnet

On 09/06/2012 12:20 PM, Zachary Mayer wrote:
Foreach is 'very slow' (i.e. has a lot of overhead) if your function 
evaluation to be parallelized in computationally trivial,  in which case 
the benefits of parallelization are rather questionable.

In the case where your function evaluation is not trivial, the overhead 
of foreach is marginal in comparison to the various *apply* methods that 
it wraps, and almost certainly worth the flexibility to not change code 
as your parallel backend changes.