Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!x5g2000yqk.googlegroups.com!not-for-mail
From: arun <aragorn168b@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: making an evaluation of a VERY long expression much faster
Date: Sat, 4 Jul 2009 05:44:40 -0700 (PDT)
Organization: http://groups.google.com
Lines: 29
Message-ID: <62dc30c3-e7a8-405e-9c9f-8101fd9a0a25@x5g2000yqk.googlegroups.com>
References: <64605448-23d8-4aab-946f-a66103ac62b6@n11g2000yqb.googlegroups.com>
NNTP-Posting-Host: 192.124.26.250
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1246711480 12222 127.0.0.1 (4 Jul 2009 12:44:40 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sat, 4 Jul 2009 12:44:40 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: x5g2000yqk.googlegroups.com; posting-host=192.124.26.250; 
	posting-account=fyqXpgoAAABqt-0BifyaNxmZhzggFACu
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1) 
	Gecko/20090624 Firefox/3.5,gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:552768


On Jul 3, 2:10 pm, kem <keme...@gmail.com> wrote:
> Hello,
> How can an evaluation of a very very long expression can be made
> faster.
> My expression has terms with the operation .* between matrices and
> then those terms  are summed together
> for example:
>
> A.*B + B.*C.^2.*D+ A.*C + .....
>
> where A B C D .. are matrices
> this can be a sum of  100 terms like these
>
> will programming it in MEX help here?
>
> Can something else be done?
>
> I am using it inside an optimization so it is crucial that it will run
> as fast as possible
>
> Thanks!

Hi Kem,

I agree to James' view. Please post your code. It might be useful to
suggest something then. Otherwise, its walking in the dark right now.

best,
arun.