On 05/12/2011 03:44 AM, robin wrote: > "Eli Osherovich"<firstname.lastname@example.org> wrote in message news:email@example.com... > | By the way, I do not know whether you prefer speed over short (and > | elegant?) code, however, in the past I ran extensive speed tests for a > | close problem: multiplying all matrix *columns* by a scalar. The fastest > | way was to use an explicit loop. > > Since you were, in effect, multipying the entire array by a scalar, > the fastest way would be to overlay a vector over the entire array > and to multiply that by the scalar. > > Robin, I am afraid your message is not clear to me. Algebraically, my function computed A*D, where D was a diagonal matrix.