<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255269</link>
    <title>MATLAB Central Newsreader - making an evaluation of a VERY long expression much faster</title>
    <description>Feed for thread: making an evaluation of a VERY long expression much faster</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Fri, 03 Jul 2009 12:10:24 -0400</pubDate>
      <title>making an evaluation of a VERY long expression much faster</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255269#662508</link>
      <author>kem</author>
      <description>Hello,&lt;br&gt;
How can an evaluation of a very very long expression can be made&lt;br&gt;
faster.&lt;br&gt;
My expression has terms with the operation .* between matrices and&lt;br&gt;
then those terms  are summed together&lt;br&gt;
for example:&lt;br&gt;
&lt;br&gt;
A.*B + B.*C.^2.*D+ A.*C + .....&lt;br&gt;
&lt;br&gt;
where A B C D .. are matrices&lt;br&gt;
this can be a sum of  100 terms like these&lt;br&gt;
&lt;br&gt;
will programming it in MEX help here?&lt;br&gt;
&lt;br&gt;
Can something else be done?&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
I am using it inside an optimization so it is crucial that it will run&lt;br&gt;
as fast as possible&lt;br&gt;
&lt;br&gt;
Thanks!</description>
    </item>
    <item>
      <pubDate>Fri, 03 Jul 2009 19:40:08 -0400</pubDate>
      <title>Re: making an evaluation of a VERY long expression much faster</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255269#662545</link>
      <author>arun</author>
      <description>On Jul 3, 2:10&#160;pm, kem &amp;lt;keme...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; Hello,&lt;br&gt;
&amp;gt; How can an evaluation of a very very long expression can be made&lt;br&gt;
&amp;gt; faster.&lt;br&gt;
&amp;gt; My expression has terms with the operation .* between matrices and&lt;br&gt;
&amp;gt; then those terms &#160;are summed together&lt;br&gt;
&amp;gt; for example:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; A.*B + B.*C.^2.*D+ A.*C + .....&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; where A B C D .. are matrices&lt;br&gt;
&amp;gt; this can be a sum of &#160;100 terms like these&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; will programming it in MEX help here?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Can something else be done?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I am using it inside an optimization so it is crucial that it will run&lt;br&gt;
&amp;gt; as fast as possible&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Thanks!&lt;br&gt;
&lt;br&gt;
if your matrix is very large, &quot;bsxfun&quot; could be useful. how long does&lt;br&gt;
it take currently to run this line? seems like there is no loop&lt;br&gt;
involved and the expression should evaluated quite fast..??&lt;br&gt;
&lt;br&gt;
best,&lt;br&gt;
arun.</description>
    </item>
    <item>
      <pubDate>Fri, 03 Jul 2009 21:09:01 -0400</pubDate>
      <title>Re: making an evaluation of a VERY long expression much faster</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255269#662555</link>
      <author>James Tursa</author>
      <description>kem &amp;lt;kemelmi@gmail.com&amp;gt; wrote in message &amp;lt;64605448-23d8-4aab-946f-a66103ac62b6@n11g2000yqb.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; Hello,&lt;br&gt;
&amp;gt; How can an evaluation of a very very long expression can be made&lt;br&gt;
&amp;gt; faster.&lt;br&gt;
&amp;gt; My expression has terms with the operation .* between matrices and&lt;br&gt;
&amp;gt; then those terms  are summed together&lt;br&gt;
&amp;gt; for example:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; A.*B + B.*C.^2.*D+ A.*C + .....&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; where A B C D .. are matrices&lt;br&gt;
&amp;gt; this can be a sum of  100 terms like these&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; will programming it in MEX help here?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Can something else be done?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I am using it inside an optimization so it is crucial that it will run&lt;br&gt;
&amp;gt; as fast as possible&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks!&lt;br&gt;
&lt;br&gt;
From what you have shown so far, I don't see anything that could be executed significantly faster in a mex routine. The matrix * and .* operators in MATLAB are already optimized pretty well. The only thing that a mex could do for you would be to eliminate some temporary variables (i.e., do the entire expression inside the mex and only create one variable to hold the final output), but I doubt that would speed things up much.&lt;br&gt;
&lt;br&gt;
James Tursa</description>
    </item>
    <item>
      <pubDate>Sat, 04 Jul 2009 12:44:40 -0400</pubDate>
      <title>Re: making an evaluation of a VERY long expression much faster</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255269#662592</link>
      <author>arun</author>
      <description>On Jul 3, 2:10&#160;pm, kem &amp;lt;keme...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; Hello,&lt;br&gt;
&amp;gt; How can an evaluation of a very very long expression can be made&lt;br&gt;
&amp;gt; faster.&lt;br&gt;
&amp;gt; My expression has terms with the operation .* between matrices and&lt;br&gt;
&amp;gt; then those terms &#160;are summed together&lt;br&gt;
&amp;gt; for example:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; A.*B + B.*C.^2.*D+ A.*C + .....&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; where A B C D .. are matrices&lt;br&gt;
&amp;gt; this can be a sum of &#160;100 terms like these&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; will programming it in MEX help here?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Can something else be done?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I am using it inside an optimization so it is crucial that it will run&lt;br&gt;
&amp;gt; as fast as possible&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Thanks!&lt;br&gt;
&lt;br&gt;
Hi Kem,&lt;br&gt;
&lt;br&gt;
I agree to James' view. Please post your code. It might be useful to&lt;br&gt;
suggest something then. Otherwise, its walking in the dark right now.&lt;br&gt;
&lt;br&gt;
best,&lt;br&gt;
arun.</description>
    </item>
    <item>
      <pubDate>Sun, 05 Jul 2009 07:11:02 -0400</pubDate>
      <title>Re: making an evaluation of a VERY long expression much faster</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255269#662671</link>
      <author>kem</author>
      <description>&lt;br&gt;
Hi Arun and James,&lt;br&gt;
Thanks for your response.&lt;br&gt;
&lt;br&gt;
Here's the expression I am evaluating:&lt;br&gt;
&lt;br&gt;
E=ux.*vy.^2.*c.*wx+2.*ux.*b.*wy.^2+ux.*c.*wx+2.*ux.*B.*wy+vy.^2.*c.*wx&lt;br&gt;
+vx.^2.*a.*wy.^2+ux.^2.*b.*wy.^2+ux.^2.*g.*vy.^2+vy.*B.*wy+2.*vy.*c.*wx&lt;br&gt;
+2.*ux.*vy.*B.*zy+2.*ux.*vy.*c.*wx+ux.*wx.*A.*wy+ux.*vy.^2.*c.*zx&lt;br&gt;
+ux.*wx.*A.*zy+ux.*wy.*A.*zx+4.*ux.*wy.*b.*zy+2.*ux.*vy.*B.*wy&lt;br&gt;
+ux.^2.*B.*wy+2.*ux.^2.*g.*vy+2.*ux.*vy.*c.*zx-ux.*vx.*c.*zy-&lt;br&gt;
ux.*vx.*A.*zy.^2-ux.*vx.*c.*wy+2.*ux.*g.*vy.^2+4.*ux.*g.*vy&lt;br&gt;
+uy.^2.*g.*vx.^2+uy.^2.*b.*wx.^2+wx.*A.*wy&lt;br&gt;
+vy.^2.*a.*wx.^2+2.*vy.*a.*wx.^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&lt;br&gt;
uy.*vx.*c.*wx-2.*vx.*vy.*wy.*a.*zx-2.*vx.*vy.*a.*zx.*zy-2.*vx.*vy.*wx.*a.*wy-2.*uy.*vx.*g-2.*uy.*vy.*wx.*A.*zx-&lt;br&gt;
uy.*vx.*vy.*c.*wx+uy.*vx.*wy.*A.*zx-uy.*vx.*vy.*c.*zx+uy.*vx.*A.*zx.*zy&lt;br&gt;
+uy.*vx.*wx.*A.*wy&lt;br&gt;
+uy.*vx.*wx.*A.*zy-2.*uy.*wx.*A.*zx-2.*vx.*vy.*wx.*a.*zy&lt;br&gt;
+uy.*vx.^2.*c.*wy-2.*uy.*wx.*b.*zy+uy.*vx.^2.*c.*zy;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Each of the variables is a 200x200 matrix. and I am calculating these&lt;br&gt;
before the evaluation of this expression, in each iteration of the&lt;br&gt;
optimization. Essentially I'd like to minimize this expression.&lt;br&gt;
&lt;br&gt;
I was thinking to write this line in mex, will it be evaluated faster?&lt;br&gt;
&lt;br&gt;
any other ideas are more than welcome ..&lt;br&gt;
&lt;br&gt;
Thanks for your help!&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
On Jul 4, 3:44&#160;pm, arun &amp;lt;aragorn1...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; On Jul 3, 2:10&#160;pm, kem &amp;lt;keme...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Hello,&lt;br&gt;
&amp;gt; &amp;gt; How can an evaluation of a very very long expression can be made&lt;br&gt;
&amp;gt; &amp;gt; faster.&lt;br&gt;
&amp;gt; &amp;gt; My expression has terms with the operation .* between matrices and&lt;br&gt;
&amp;gt; &amp;gt; then those terms &#160;are summed together&lt;br&gt;
&amp;gt; &amp;gt; for example:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; A.*B + B.*C.^2.*D+ A.*C + .....&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; where A B C D .. are matrices&lt;br&gt;
&amp;gt; &amp;gt; this can be a sum of &#160;100 terms like these&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; will programming it in MEX help here?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Can something else be done?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; I am using it inside an optimization so it is crucial that it will run&lt;br&gt;
&amp;gt; &amp;gt; as fast as possible&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Thanks!&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Hi Kem,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I agree to James' view. Please post your code. It might be useful to&lt;br&gt;
&amp;gt; suggest something then. Otherwise, its walking in the dark right now.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; best,&lt;br&gt;
&amp;gt; arun.- Hide quoted text -&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; - Show quoted text -</description>
    </item>
    <item>
      <pubDate>Sun, 05 Jul 2009 08:12:01 -0400</pubDate>
      <title>Re: making an evaluation of a VERY long expression much faster</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255269#662675</link>
      <author>James Tursa</author>
      <description>kem &amp;lt;kemelmi@gmail.com&amp;gt; wrote in message &amp;lt;932c3692-54a8-453b-bcf5-e6e0f69ca69f@h18g2000yqj.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Hi Arun and James,&lt;br&gt;
&amp;gt; Thanks for your response.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Here's the expression I am evaluating:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; E=ux.*vy.^2.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.*c.*wy-2.*uy.*wx.*b.*zy+uy.*vx.^2.*c.*zy;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Each of the variables is a 200x200 matrix. and I am calculating these&lt;br&gt;
&amp;gt; before the evaluation of this expression, in each iteration of the&lt;br&gt;
&amp;gt; optimization. Essentially I'd like to minimize this expression.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I was thinking to write this line in mex, will it be evaluated faster?&lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
Well, I have to admit the subject title you picked for this thread is *very* accurate ... that is indeed a very long expression! It has a lot of repeated variables, and a lot of intermediate variables, which potentially makes it a good candidate for speedup in a custom mex routine, particularly if you are using a good optimizing C compiler. To give you an example, I just coded up the first line in your expression. Here is the build process I used:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ux = rand(200,200);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;vy = rand(200,200);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;c  = rand(200,200);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;wx = rand(200,200);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;b  = rand(200,200);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;wy = rand(200,200);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;B  = rand(200,200);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;
Here is the mex routine (bare bones, no argument checking):&lt;br&gt;
&lt;br&gt;
#include &quot;mex.h&quot;&lt;br&gt;
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;double *ux, *vy, *c, *wx, *b, *wy, *B, *E;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mwSize i, n;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;n = mxGetNumberOfElements(prhs[0]);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ux = mxGetPr(prhs[0]);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;vy = mxGetPr(prhs[1]);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;c  = mxGetPr(prhs[2]);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;wx = mxGetPr(prhs[3]);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;b  = mxGetPr(prhs[4]);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;wy = mxGetPr(prhs[5]);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;B  = mxGetPr(prhs[6]);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;plhs[0] = mxCreateDoubleMatrix(mxGetM(prhs[0]), mxGetN(prhs[0]), mxREAL);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;E = mxGetPr(plhs[0]);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for( i=0; i&amp;lt;n; i++ ) {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;E[i] = ux[i]*vy[i]*vy[i]*c[i]*wx[i]+&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2.*ux[i]*b[i]*wy[i]*wy[i]+&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ux[i]*c[i]*wx[i]+&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2.*ux[i]*B[i]*wy[i]+&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;vy[i]*vy[i]*c[i]*wx[i];&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
And here are the results (WinXP, MSVC8):&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; tic;ux.*vy.^2.*c.*wx+2.*ux.*b.*wy.^2+ux.*c.*wx+2.*ux.*B.*wy+vy.^2.*c.*wx;toc&lt;br&gt;
Elapsed time is 0.006098 seconds.&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; tic;dottimestest(ux,vy,c,wx,b,wy,B);toc&lt;br&gt;
Elapsed time is 0.001312 seconds.&lt;br&gt;
&lt;br&gt;
So there is quite a bit of speedup here. We have eliminated the *very* many intermediate variables created with the MATLAB expression and all of the associated extra allocation/deallocation and conversion between 64-bit double and 80-bit extended precision. In essence, the compiler is very likely doing the entire expression in 80-bit extended precision and only one conversion each way. Also presumably the compiler is taking advantage of common sub-expressions and eliminating some of the computations. So for your case, yes it looks like a mex routine will yield a significant speedup if you are willing to put in the effort to build it. Using my example as a starting point it probably will not take you too long. One piece of advice ... although it will look ugly be sure to put the entire expression on one logical line. Don't use temporary variables to store sub-expressions and then use &lt;br&gt;
those variables to sum up later on. By doing everything on one logical line (i.e., it can be on several physical lines like my example above but don't put a semi-colon until the very end) you will give the compiler the freedom to do everything in 80-bit extended precision (if you are on a PC) and this will minimize extra unnecessary conversions and loss of precision between 64-bit double and 80-bit extended. But be advised that you will in all likelihood *not* get exactly the same result as the MATLAB expression. This is to be expected because you are not doing all of the unnecessary multiple 64-bit / 80-bit conversions for the intermediate variables like the MATLAB expression does. The results will probably only differ in a few trailing bits which will probably not be significant (max relative difference likely in the 1e-15 range), but in any event the mex routine will be the more &lt;br&gt;
accurate of the two because of the reasons spelled out above. &lt;br&gt;
&lt;br&gt;
James Tursa</description>
    </item>
    <item>
      <pubDate>Sun, 05 Jul 2009 08:38:59 -0400</pubDate>
      <title>Re: making an evaluation of a VERY long expression much faster</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255269#662679</link>
      <author>kem</author>
      <description>On Jul 5, 11:12&#160;am, &quot;James Tursa&quot; &amp;lt;aclassyguywithakno...@hotmail.com&amp;gt;&lt;br&gt;
wrote:&lt;br&gt;
&amp;gt; kem &amp;lt;keme...@gmail.com&amp;gt; wrote in message &amp;lt;932c3692-54a8-453b-bcf5-e6e0f69ca...@h18g2000yqj.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Hi Arun and James,&lt;br&gt;
&amp;gt; &amp;gt; Thanks for your response.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Here's the expression I am evaluating:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; E=ux.*vy.^2.*c.*wx+2.*ux.*b.*wy.^2+ux.*c.*wx+2.*ux.*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y&lt;br&gt;
&amp;gt; &amp;gt; +uy.*vx.*wx.*A.*wy&lt;br&gt;
&amp;gt; &amp;gt; +uy.*vx.*wx.*A.*zy-2.*uy.*wx.*A.*zx-2.*vx.*vy.*wx.*a.*zy&lt;br&gt;
&amp;gt; &amp;gt; +uy.*vx.^2.*c.*wy-2.*uy.*wx.*b.*zy+uy.*vx.^2.*c.*zy;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Each of the variables is a 200x200 matrix. and I am calculating these&lt;br&gt;
&amp;gt; &amp;gt; before the evaluation of this expression, in each iteration of the&lt;br&gt;
&amp;gt; &amp;gt; optimization. Essentially I'd like to minimize this expression.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; I was thinking to write this line in mex, will it be evaluated faster?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Well, I have to admit the subject title you picked for this thread is *very* accurate ... that is indeed a very long expression! It has a lot of repeated variables, and a lot of intermediate variables, which potentially makes it a good candidate for speedup in a custom mex routine, particularly if you are using a good optimizing C compiler. To give you an example, I just coded up the first line in your expression. Here is the build process I used:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &#160; &#160; ux = rand(200,200);&lt;br&gt;
&amp;gt; &#160; &#160; vy = rand(200,200);&lt;br&gt;
&amp;gt; &#160; &#160; c &#160;= rand(200,200);&lt;br&gt;
&amp;gt; &#160; &#160; wx = rand(200,200);&lt;br&gt;
&amp;gt; &#160; &#160; b &#160;= rand(200,200);&lt;br&gt;
&amp;gt; &#160; &#160; wy = rand(200,200);&lt;br&gt;
&amp;gt; &#160; &#160; B &#160;= rand(200,200);&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Here is the mex routine (bare bones, no argument checking):&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; #include &quot;mex.h&quot;&lt;br&gt;
&amp;gt; void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])&lt;br&gt;
&amp;gt; {&lt;br&gt;
&amp;gt; &#160; &#160; double *ux, *vy, *c, *wx, *b, *wy, *B, *E;&lt;br&gt;
&amp;gt; &#160; &#160; mwSize i, n;&lt;br&gt;
&amp;gt; &#160; &#160; n = mxGetNumberOfElements(prhs[0]);&lt;br&gt;
&amp;gt; &#160; &#160; ux = mxGetPr(prhs[0]);&lt;br&gt;
&amp;gt; &#160; &#160; vy = mxGetPr(prhs[1]);&lt;br&gt;
&amp;gt; &#160; &#160; c &#160;= mxGetPr(prhs[2]);&lt;br&gt;
&amp;gt; &#160; &#160; wx = mxGetPr(prhs[3]);&lt;br&gt;
&amp;gt; &#160; &#160; b &#160;= mxGetPr(prhs[4]);&lt;br&gt;
&amp;gt; &#160; &#160; wy = mxGetPr(prhs[5]);&lt;br&gt;
&amp;gt; &#160; &#160; B &#160;= mxGetPr(prhs[6]);&lt;br&gt;
&amp;gt; &#160; &#160; plhs[0] = mxCreateDoubleMatrix(mxGetM(prhs[0]), mxGetN(prhs[0]), mxREAL);&lt;br&gt;
&amp;gt; &#160; &#160; E = mxGetPr(plhs[0]);&lt;br&gt;
&amp;gt; &#160; &#160; for( i=0; i&amp;lt;n; i++ ) {&lt;br&gt;
&amp;gt; &#160; &#160; &#160; &#160; E[i] = ux[i]*vy[i]*vy[i]*c[i]*wx[i]+&lt;br&gt;
&amp;gt; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;2.*ux[i]*b[i]*wy[i]*wy[i]+&lt;br&gt;
&amp;gt; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;ux[i]*c[i]*wx[i]+&lt;br&gt;
&amp;gt; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;2.*ux[i]*B[i]*wy[i]+&lt;br&gt;
&amp;gt; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;vy[i]*vy[i]*c[i]*wx[i];&lt;br&gt;
&amp;gt; &#160; &#160; }&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; }&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; And here are the results (WinXP, MSVC8):&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; tic;ux.*vy.^2.*c.*wx+2.*ux.*b.*wy.^2+ux.*c.*wx+2.*ux.*B.*wy+vy.^2.*c.*wx;to&#173;c&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Elapsed time is 0.006098 seconds.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; tic;dottimestest(ux,vy,c,wx,b,wy,B);toc&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Elapsed time is 0.001312 seconds.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; So there is quite a bit of speedup here. We have eliminated the *very* many intermediate variables created with the MATLAB expression and all of the associated extra allocation/deallocation and conversion between 64-bit double and 80-bit extended precision. In essence, the compiler is very likely doing the entire expression in 80-bit extended precision and only one conversion each way. Also presumably the compiler is taking advantage of common sub-expressions and eliminating some of the computations. So for your case, yes it looks like a mex routine will yield a significant speedup if you are willing to put in the effort to build it. Using my example as a starting point it probably will not take you too long. One piece of advice ... although it will look ugly be sure to put the entire expression on one logical line. Don't use temporary variables to store sub-expressions and then use&lt;br&gt;
&amp;gt; those variables to sum up later on. By doing everything on one logical line (i.e., it can be on several physical lines like my example above but don't put a semi-colon until the very end) you will give the compiler the freedom to do everything in 80-bit extended precision (if you are on a PC) and this will minimize extra unnecessary conversions and loss of precision between 64-bit double and 80-bit extended. But be advised that you will in all likelihood *not* get exactly the same result as the MATLAB expression. This is to be expected because you are not doing all of the unnecessary multiple 64-bit / 80-bit conversions for the intermediate variables like the MATLAB expression does. The results will probably only differ in a few trailing bits which will probably not be significant (max relative difference likely in the 1e-15 range), but in any event the mex routine will be the more&lt;br&gt;
&amp;gt; accurate of the two because of the reasons spelled out above.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; James Tursa- Hide quoted text -&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; - Show quoted text -&lt;br&gt;
&lt;br&gt;
many thanks!! will try it now.</description>
    </item>
    <item>
      <pubDate>Sun, 05 Jul 2009 16:15:03 -0400</pubDate>
      <title>Re: making an evaluation of a VERY long expression much faster</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255269#662721</link>
      <author>Matt </author>
      <description>kem &amp;lt;kemelmi@gmail.com&amp;gt; wrote in message &amp;lt;932c3692-54a8-453b-bcf5-e6e0f69ca69f@h18g2000yqj.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Hi Arun and James,&lt;br&gt;
&amp;gt; Thanks for your response.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Here's the expression I am evaluating:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; E=ux.*vy.^2.*c.*wx+2.*ux.*b.*wy.^2+ux.*c.*wx+2.*ux.*B.*wy+vy.^2.*c.*wx&lt;br&gt;
&amp;gt; +vx.^2.*a.*wy.^2+ux.^2.*b.*wy.^2+ux.^2.*g.*vy.^2+vy.*B.*wy+2.*vy.*c.*wx&lt;br&gt;
&amp;gt;....&lt;br&gt;
&lt;br&gt;
You might want to describe where this expression comes from. It's hard to imagine that a creature like this pops up in the initial formulation of a problem.&lt;br&gt;
In particular, might it have a factored form or originate from the expansion of a simpler expression?  If so, it would be better from the point of view of speed to work with the more compact, factored form.&lt;br&gt;
&lt;br&gt;
&amp;gt; Each of the variables is a 200x200 matrix. and I am calculating these&lt;br&gt;
&amp;gt; before the evaluation of this expression, in each iteration of the&lt;br&gt;
&amp;gt; optimization. Essentially I'd like to minimize this expression.&lt;br&gt;
&lt;br&gt;
That doesn't seem possible. If all the variables are 200x200 it means E is likewise 200x200. How do you plan to &quot;minimize&quot; a non-scalar expression?</description>
    </item>
    <item>
      <pubDate>Mon, 06 Jul 2009 07:29:00 -0400</pubDate>
      <title>Re: making an evaluation of a VERY long expression much faster</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255269#662806</link>
      <author>kem</author>
      <description>On Jul 5, 7:15&#160;pm, &quot;Matt &quot; &amp;lt;x...@whatever.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; kem &amp;lt;keme...@gmail.com&amp;gt; wrote in message &amp;lt;932c3692-54a8-453b-bcf5-e6e0f69ca...@h18g2000yqj.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Hi Arun and James,&lt;br&gt;
&amp;gt; &amp;gt; Thanks for your response.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Here's the expression I am evaluating:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; E=ux.*vy.^2.*c.*wx+2.*ux.*b.*wy.^2+ux.*c.*wx+2.*ux.*B.*wy+vy.^2.*c.*wx&lt;br&gt;
&amp;gt; &amp;gt; +vx.^2.*a.*wy.^2+ux.^2.*b.*wy.^2+ux.^2.*g.*vy.^2+vy.*B.*wy+2.*vy.*c.*wx&lt;br&gt;
&amp;gt; &amp;gt;....&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; You might want to describe where this expression comes from. It's hard to imagine that a creature like this pops up in the initial formulation of a problem.&lt;br&gt;
&amp;gt; In particular, might it have a factored form or originate from the expansion of a simpler expression? &#160;If so, it would be better from the point of view of speed to work with the more compact, factored form.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Each of the variables is a 200x200 matrix. and I am calculating these&lt;br&gt;
&amp;gt; &amp;gt; before the evaluation of this expression, in each iteration of the&lt;br&gt;
&amp;gt; &amp;gt; optimization. Essentially I'd like to minimize this expression.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; That doesn't seem possible. If all the variables are 200x200 it means E is likewise 200x200. How do you plan to &quot;minimize&quot; a non-scalar expression?&lt;br&gt;
&lt;br&gt;
E is 200x200 too. I plan to take an L2 norm of E and minimize it.</description>
    </item>
  </channel>
</rss>

