Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: FOR loops performance - 32bit vs 64 bit Matlab
Date: Mon, 13 Oct 2008 19:06:02 +0000 (UTC)
Organization: Universit&#228;t Heidelberg
Lines: 19
Message-ID: <gd066q$jom$1@fred.mathworks.com>
References: <g717k3$kb3$1@news.dialog.net.pl> <gcu81i$rom$1@fred.mathworks.com> <122519c2-549e-466c-afc7-26cdde4baf8f@x41g2000hsb.googlegroups.com> <gcvib5$ijm$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1223924762 20246 172.30.248.37 (13 Oct 2008 19:06:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 13 Oct 2008 19:06:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869888
Xref: news.mathworks.com comp.soft-sys.matlab:494935


> Steve Amphlett wrote:
> 
> I understood that the M$ implementation of "long long" (64-bit integer) was very slow.  Maybe this is where to point the finger?

What happens if the loop indices are defined as UINT32?

> for n=1:col_no
>        for m=1:row_no
>            for k=1:D(m, n)

-->

for n=uint32(1):uint32(col_no)
        for m=uint32(1):uint32(row_no)
            for k=uint32(1):uint32(D(m, n))

This would be the way I investigate such questions in C.

Jan