Hi, A quick bench-mark of an R matrix muliplication 500by500 X 500by10000, all random variates, with matlab reveals a huge difference in speed (5 times at least). Is there anything that can be done in R to speed up the multiplication? Kind regards, Oyvind -- View this message in context: http://r.789695.n4.nabble.com/matrix-multiplication-speed-R-tp3217257p3217257.html Sent from the R devel mailing list archive at Nabble.com.
Please give the code you used for the matrix multiplication. 5 times is a bit much. On Fri, Jan 14, 2011 at 9:09 AM, oyvfos <oyvfos@yahoo.no> wrote:> > Hi, > A quick bench-mark of an R matrix muliplication 500by500 X 500by10000, all > random variates, with matlab reveals a huge difference in speed (5 times at > least). Is there anything that can be done in R to speed up the > multiplication? > Kind regards, Oyvind > -- > View this message in context: > http://r.789695.n4.nabble.com/matrix-multiplication-speed-R-tp3217257p3217257.html > Sent from the R devel mailing list archive at Nabble.com. > > ______________________________________________ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >-- Joris Meys Statistical consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control tel : +32 9 264 59 87 Joris.Meys@Ugent.be ------------------------------- Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php [[alternative HTML version deleted]]
On 14.01.2011 11:38, Joris Meys wrote:> Please give the code you used for the matrix multiplication. 5 times is a > bit much.No, it is reasonable for matrix multiplication: Matlab ships with optimized BLAS for various CPU types. In R, you have to get an optimized BLAS yourself. How to link against optimized BLAS versions or how to substitute the BLAS is mentioned in the R INstallation and Administration manual. Best, Uwe Ligges> > On Fri, Jan 14, 2011 at 9:09 AM, oyvfos<oyvfos at yahoo.no> wrote: > >> >> Hi, >> A quick bench-mark of an R matrix muliplication 500by500 X 500by10000, all >> random variates, with matlab reveals a huge difference in speed (5 times at >> least). Is there anything that can be done in R to speed up the >> multiplication? >> Kind regards, Oyvind >> -- >> View this message in context: >> http://r.789695.n4.nabble.com/matrix-multiplication-speed-R-tp3217257p3217257.html >> Sent from the R devel mailing list archive at Nabble.com. >> >> ______________________________________________ >> R-devel at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel >> > > >
Thanks very much, Uwe. The calculation time is now comparable with matlab. Oyvind -- View this message in context: http://r.789695.n4.nabble.com/matrix-multiplication-speed-R-tp3217257p3217539.html Sent from the R devel mailing list archive at Nabble.com.
Hi Can we use BLAS in R X64 for windows? Regards Aftar -- View this message in context: http://r.789695.n4.nabble.com/matrix-multiplication-speed-R-tp3217257p3509596.html Sent from the R devel mailing list archive at Nabble.com.