Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: if statements - drastic difference in running time
Date: Fri, 23 Mar 2012 02:18:13 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 9
Message-ID: <jkgmh5$9i0$1@newscl01ah.mathworks.com>
References: <jkf6uj$ni$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1332469093 9792 172.30.248.37 (23 Mar 2012 02:18:13 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 23 Mar 2012 02:18:13 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:761897

"MaxEOE" wrote in message <jkf6uj$ni$1@newscl01ah.mathworks.com>...
> I have encountered the following odd behavior I have no explanation for:
> ........
- - - - - - - - - -
  You should be collecting the sum of the ten j-values at the point where the 'break' occurs, which will give you the total number of trips through the inner loop.  On my machine when I take the ratio of that sum to the tic-toc time it varies very little from one run to another and between query 1 and 2.  Try this on your machine.

  Remember, 10 is not a very large number and there should be considerable variation in the above sum, which might conceivably account for your observations.  If not, then you would have a much more convincing case to present to MathWorks' experts.

Roger Stafford