[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Order of matrix multiplication

From: siko1056
Subject: Re: Order of matrix multiplication
Date: Tue, 13 Sep 2016 01:36:59 -0700 (PDT)

Mike Miller-4 wrote
> Agreed. IMHO mtimes and the * operator would retain the expected
> left-associativity property, but another function could be introduced
> that determines a different order to perform pairwise multiplications
> for performance.

I think many Octave users know from courses about linear algebra, that the
order of operations matters (e.g. painful pen&paper computation of outer
product times vector w'*w*x or w'*(w*x)) and are able to identify such
inappropriate operation order, like in the initial example.

I agree that Octave can have linter integrated inside the editor (like with
Matlab's checkcode function) to suggest such and many other optimizations
(vectorizing statements, ...). But I would not like to apply optimizations
by default. Maybe some teaching person likes to visualize this effect, or
simply relies on the order of operations.


View this message in context:
Sent from the Octave - General mailing list archive at

reply via email to

[Prev in Thread] Current Thread [Next in Thread]