Path: news.mathworks.com!not-for-mail
From: "Sakhr " <sakhr98@Remove.This.hotmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: FOR loops performance - 32bit vs 64 bit Matlab
Date: Thu, 6 Nov 2008 16:58:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 29
Message-ID: <gev7mq$6hc$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> <gd066q$jom$1@fred.mathworks.com>
Reply-To: "Sakhr " <sakhr98@Remove.This.hotmail.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1225990682 6700 172.30.248.35 (6 Nov 2008 16:58:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 6 Nov 2008 16:58:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1588624
Xref: news.mathworks.com comp.soft-sys.matlab:499332


I too have recently experienced the same problem. I have tested 
the same matlab code on a Xeon X5460 3.16GHz workstation and on laptop with T2500 processor. The workstation was 60% slower.

Anybody found the reason for this strange behavior?

Thank you in advance.

Best regards, Sakhr.

"Jan Simon" <matlab.THIS_YEAR@nMINUSsimon.de> wrote in message <gd066q$jom$1@fred.mathworks.com>...
> > 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