Re: [Rd] Speeding up matrix multiplies

2010-08-27 Thread James Cloos
I just tried out the effects of using R's NA value¹ with C arithmetic on an amd64 linux box. I always got a NAN result for which R's R_IsNA() would return true. At least on this platform, NAN's propagate w/o a change in their lower 32 bits. If NA is supposed to propagate the way NaN is spec'ed

Re: [Rd] Speeding up matrix multiplies

2010-08-24 Thread Göran Broström
On 2010-08-24 05:37, Kasper Daniel Hansen wrote: On Mon, Aug 23, 2010 at 10:39 PM, Radford Nealradf...@cs.toronto.edu wrote: On Aug 23, 2010, at 7:39 PM, Radford Neal wrote: In particular, all matrix x vector and vector x matrix products will in this version be done in the matprod

Re: [Rd] Speeding up matrix multiplies

2010-08-24 Thread Dirk Eddelbuettel
On 24 August 2010 at 09:13, Göran Broström wrote: | | On 2010-08-24 05:37, Kasper Daniel Hansen wrote: | On Mon, Aug 23, 2010 at 10:39 PM, Radford Nealradf...@cs.toronto.edu wrote: | On Aug 23, 2010, at 7:39 PM, Radford Neal wrote: | | In particular, all matrix x vector and vector x matrix

Re: [Rd] Speeding up matrix multiplies

2010-08-23 Thread Radford Neal
Regarding my previous message on speeding up matrix multiplies, I've realized that the size of the result matrix is not really the right criterion for deciding to do the computation without using the Fortran routine. A better criterion would be based on the ratio of the time for the matrix

Re: [Rd] Speeding up matrix multiplies

2010-08-23 Thread Simon Urbanek
On Aug 23, 2010, at 7:39 PM, Radford Neal wrote: Regarding my previous message on speeding up matrix multiplies, I've realized that the size of the result matrix is not really the right criterion for deciding to do the computation without using the Fortran routine. A better criterion would

Re: [Rd] Speeding up matrix multiplies

2010-08-23 Thread Radford Neal
On Aug 23, 2010, at 7:39 PM, Radford Neal wrote: In particular, all matrix x vector and vector x matrix products will in this version be done in the matprod routine, not the Fortran routine. And this is the right thing to do, since the time for the ISNAN check before calling the Fortan

Re: [Rd] Speeding up matrix multiplies

2010-08-23 Thread Kasper Daniel Hansen
On Mon, Aug 23, 2010 at 10:39 PM, Radford Neal radf...@cs.toronto.edu wrote: On Aug 23, 2010, at 7:39 PM, Radford Neal wrote: In particular, all matrix x vector and vector x matrix products will in this version be done in the matprod routine, not the Fortran routine. And this is the right