It's better to separate parts out so that you know, for example, - in generating random numbers with a normal distribution the factor is x - in doing inner product the factor is y
----- Original Message ----- From: Raul Miller <[EMAIL PROTECTED]> Date: Thursday, November 8, 2007 15:02 Subject: Re: [Jprogramming] Re: speed of matrix*vector operation To: Programming forum <[email protected]> > On Nov 8, 2007 5:51 PM, Roger Hui <[EMAIL PROTECTED]> wrote: > > Yes, but have you included the time to generate the > > random numbers in your MatLab benchmark? > > Because you are including it in your J benchmark. > > Here's a version of the MatLab benchmark which puts the random > number generation inside the loop: > > tic > for i = 1:1000 > matrix = randn(312,256); > vector = randn(256,1); > output = matrix*vector; > end > toc ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
