Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: 30% faster for-loop when changing loop variable from default(double) to int
Date: Mon, 14 May 2012 18:44:10 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 5
Message-ID: <jorjpq$266$1@newscl01ah.mathworks.com>
References: <jor8fr$a4n$1@newscl01ah.mathworks.com> <jorekp$86u$1@newscl01ah.mathworks.com> <jori3c$nm3$1@newscl01ah.mathworks.com>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
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 1337021050 2246 172.30.248.37 (14 May 2012 18:44:10 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 14 May 2012 18:44:10 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:767796

I agree with Matt and James. There are many things that can lead to wrong timings and false conclusion. The risk is greatlly reduced by using this FEX tool:

http://www.mathworks.fr/matlabcentral/fileexchange/18798-timeit-benchmarking-function

Bruno