Skip to content
Prev 272 / 2152 Next

The foreach, iterators and doMC packages

And you can get much better results using sqrt directly on the vector,
as it is intended to be called.  The sqrt function is so fast that it's
crazy to call it in parallel the way my vignette shows.  The
overhead kills you.  But I have this bad habit of using sqrt in my
parallel programming examples.  I actually put a footnote in the
vignette saying you should never do what I just did, but I can see
now that I wasn't nearly explicit enough.  I should probably include
a big disclaimer saying not to try this at home.

I'm pretty sure that the next version of foreach will issue warnings
if the tasks execute in less than a second.  But I'll definitely fix
the vignette.  Sorry about that.

- Steve
On Wed, Jul 15, 2009 at 12:54 PM, Mark Kimpel<mwkimpel at gmail.com> wrote: