Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!n11g2000yqb.googlegroups.com!not-for-mail
From: kem <kemelmi@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: making an evaluation of a VERY long expression much faster
Date: Fri, 3 Jul 2009 05:10:24 -0700 (PDT)
Organization: http://groups.google.com
Lines: 24
Message-ID: <64605448-23d8-4aab-946f-a66103ac62b6@n11g2000yqb.googlegroups.com>
NNTP-Posting-Host: 132.77.4.129
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1246623024 621 127.0.0.1 (3 Jul 2009 12:10:24 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 3 Jul 2009 12:10:24 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: n11g2000yqb.googlegroups.com; posting-host=132.77.4.129; 
	posting-account=UKxCVgoAAAABvWaCgw-9-SAknbQcOdS3
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; 
	Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 wisweb2-out (NetCache NetApp/6.0.6)
Xref: news.mathworks.com comp.soft-sys.matlab:552683


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!