[Rcpp-devel] parallel distance matrix calculation

JJ Allaire jj.allaire at gmail.com
Mon Jul 14 18:48:25 CEST 2014

> On a 4 core machine (8 with hyperthreading) I'm observing a 10x speedup.
> The parallel related speedup is 4x. There is an additional 2.5x speedup
> which appears to be related to the lower level access to the Matrix memory
> done by RMatrix<T> (and perhaps some elimination of copying).

It turns out that the additional slowdown in the serial version was due to
repeatedly calling Vector::length as a loop termination condition. I
re-wrote the serial version using iterators and now the speedup from
parallel is about 5x (more in line with expectations).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20140714/39077e47/attachment.html>

More information about the Rcpp-devel mailing list