Thread Subject: comparing CPU task speed: proposed experiment

Subject: comparing CPU task speed: proposed experiment

From: Kevin Johnson

Date: 23 Oct, 2008 19:35:04

Message: 1 of 15

 All,

I'm looking to buy a new laptop computer and upgrade to the latest MATLAB. I much prefer Macs, but need the best possible (laptop) speed. After reading the forums I am still a bit unsure of the precise differences in performance of various hardware combinations. Inevitably, I know, performance measures depend on the specific task.

My works doesn't use particularly large files, or much I/O or graphics, but involves intensive calculation.

So I'd like to propose a little exerimaent. Below is a snippet of typical code that is called many times. Perhaps if you have a well-appointed laptop you could run it and let me know how long it takes. The we can see the difference in speed between a recent fast PC running Windows, the latest Macbook Pro running MATLAB under OS X, and the same Mac running MATLAB under a Windows simulator.

Thanks,
Kevin
P.S. I've looped it 5000 times just to get the total time to something reasonable for comparison. It takes 6.9955 seconds on my PowerBook G4 1.6 GHz. under OS X.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    
load train %load train whistle file into y
tic
for w=1:5000
       r=800;
s=zeros(r,6);
s(:,1)=y(1:r);
        m=[1:5];
n=2.^(m-1);
        bb=2.*n+1;
        for m=1:5
             s(n(m)+1:r-n(m),m+1)=...
                             cumsum([sum(s(1:2*n(m)+1,m));...
                             s(2*n(m)+2:r,m)-s(1:r-2*n(m)-1,m)])./bb(m);
end
w=diff(s')';
end
toc

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Subject: comparing CPU task speed: proposed experiment

From: Bruno Luong

Date: 23 Oct, 2008 19:56:02

Message: 2 of 15

2.305280 seconds. Sony laptop Core2 Duo T7250 2GHz Vista, Matlab 2008B.

I did some testing last year, and Mac material usually runs faster (not negligible) under Windows than MacOS.

See also this thread: http://www.mathworks.com/matlabcentral/newsreader/view_thread/160599

Bruno

Subject: comparing CPU task speed: proposed experiment

From: Kevin Johnson

Date: 23 Oct, 2008 22:18:02

Message: 3 of 15

Thanks Bruno. I was hoping for a bigger boost than 3x.
DO you think the desktop Mac Pro would be substantially faster?

Subject: comparing CPU task speed: proposed experiment

From: Joaquim Luis

Date: 23 Oct, 2008 22:34:02

Message: 4 of 15

"Kevin Johnson" <defer.jof@gmail.com> wrote in message <gdqt6q$m23$1@fred.mathworks.com>...
> Thanks Bruno. I was hoping for a bigger boost than 3x.
> DO you think the desktop Mac Pro would be substantially faster?

Between 1.3 and 1.5 secs on a MacBook Pro 2.5 GHz runing native windows XP and R13.

J. Luis

Subject: comparing CPU task speed: proposed experiment

From: Joaquim Luis

Date: 23 Oct, 2008 22:35:04

Message: 5 of 15

"Kevin Johnson" <defer.jof@gmail.com> wrote in message <gdqt6q$m23$1@fred.mathworks.com>...
> Thanks Bruno. I was hoping for a bigger boost than 3x.
> DO you think the desktop Mac Pro would be substantially faster?

Between 1.3 and 1.5 secs on a MacBook Pro 2.5 GHz runing native windows XP and R13.

J. Luis

Subject: comparing CPU task speed: proposed experiment

From: Bruno Luong

Date: 24 Oct, 2008 05:49:01

Message: 6 of 15

"Kevin Johnson" <defer.jof@gmail.com> wrote in message <gdqt6q$m23$1@fred.mathworks.com>...
> Thanks Bruno. I was hoping for a bigger boost than 3x.
> DO you think the desktop Mac Pro would be substantially faster?

Mac Pro is pretty fast when (I tested it in April), surely one of the fastest Matlab machine (under Windows). Very nice computer with. However the 2 x 8 cores seem not to be fully exploited by most of Matlab code. Beware that Matlab is slower under Leopard.

We benchmark a cheaper Dell with 2 cores processor is even faster (we ended up buy that).

If you intend to develop specifically parallel algorithm that uses more efficiently multicore CPU you might consider the advantage of 8 cores.

Bruno

Subject: comparing CPU task speed: proposed experiment

From: Ulf Graewe

Date: 24 Oct, 2008 06:12:04

Message: 7 of 15

1.1 seconds on a Lenovo T61 2.6Ghz Core2Duo. Fedora 8 and Matlab 2007a

Subject: comparing CPU task speed: proposed experiment

From: Paul

Date: 24 Oct, 2008 06:47:01

Message: 8 of 15

"Ulf Graewe" <me@uni.com> wrote in message <gdrovk$e60$1@fred.mathworks.com>...
> 1.1 seconds on a Lenovo T61 2.6Ghz Core2Duo. Fedora 8 and Matlab 2007a

Your time is interesting since I'm running a Thinkpad T61 2.4GHz dual core on Windows XP and I get a time of 1.7 seconds. Is Fedora that much faster? WHY?

Subject: comparing CPU task speed: proposed experiment

From: Ulf Graewe

Date: 24 Oct, 2008 08:15:04

Message: 9 of 15


> Your time is interesting since I'm running a Thinkpad T61 2.4GHz dual core on Windows XP and I get a time of 1.7 seconds. Is Fedora that much faster? WHY?

Sorry, I have no clue. But I realised that I only have a 2.5 Ghz system - so its even better --- jipeee!.
Might be possible that Windows has much more overhead and this leads to a slow down. Anyway I use my T61 for lots of Fortran computations and this is much better done with Linux.

for performance comparison:
bench test (R2007a, 4G Ram)

bench = 0.1500 0.1800 0.1700 0.3200 0.2700 0.1500

Subject: comparing CPU task speed: proposed experiment

From: Bruno Luong

Date: 24 Oct, 2008 08:18:02

Message: 10 of 15

0.798059 seconds on Dell Core2 Duo E8500 3.16GHz, Vista + Matlab 2008a 64 bits.

Bruno

Subject: comparing CPU task speed: proposed experiment

From: Kris De Gussem

Date: 24 Oct, 2008 09:15:58

Message: 11 of 15

1.4571 seconds on WinXP Pro, T7200 (inspiron 6400) 1 GB ram

This value is the average of ten runs

Very important when performing this test is that you save it to an m-file first
and NOT doing a copy past of the code. The difference in my case was more than a
second. I guess it might due to showing the code in the command window and or
io-operations within matlab (but in fact that's just gambling :) )

Subject: comparing CPU task speed: proposed experiment

From: Kris De Gussem

Date: 24 Oct, 2008 09:18:12

Message: 12 of 15

Paul schreef:
> "Ulf Graewe" <me@uni.com> wrote in message <gdrovk$e60$1@fred.mathworks.com>...
>> 1.1 seconds on a Lenovo T61 2.6Ghz Core2Duo. Fedora 8 and Matlab 2007a
>
> Your time is interesting since I'm running a Thinkpad T61 2.4GHz dual core on Windows XP and I get a time of 1.7 seconds. Is Fedora that much faster? WHY?

See also my other message in this thread. Saving the code to a file probably
makes a huge difference in time/performance. Can you try saving the code to a .m
file and running that script? I guess the difference between windows and linux
would be a bit less.

K.

Subject: comparing CPU task speed: proposed experiment

From: Arnaud Miege

Date: 24 Oct, 2008 09:39:46

Message: 13 of 15


"Kevin Johnson" <defer.jof@gmail.com> wrote in message
news:gdqjl8$57u$1@fred.mathworks.com...
> All,
>
> I'm looking to buy a new laptop computer and upgrade to the latest MATLAB.
> I much prefer Macs, but need the best possible (laptop) speed. After
> reading the forums I am still a bit unsure of the precise differences in
> performance of various hardware combinations. Inevitably, I know,
> performance measures depend on the specific task.
>
> My works doesn't use particularly large files, or much I/O or graphics,
> but involves intensive calculation.
>
> So I'd like to propose a little exerimaent. Below is a snippet of typical
> code that is called many times. Perhaps if you have a well-appointed
> laptop you could run it and let me know how long it takes. The we can see
> the difference in speed between a recent fast PC running Windows, the
> latest Macbook Pro running MATLAB under OS X, and the same Mac running
> MATLAB under a Windows simulator.
>
> Thanks,
> Kevin
> P.S. I've looped it 5000 times just to get the total time to something
> reasonable for comparison. It takes 6.9955 seconds on my PowerBook G4 1.6
> GHz. under OS X.
>
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
> load train %load train whistle file into y
> tic
> for w=1:5000
> r=800;
> s=zeros(r,6);
> s(:,1)=y(1:r);
> m=[1:5];
> n=2.^(m-1);
> bb=2.*n+1;
> for m=1:5
> s(n(m)+1:r-n(m),m+1)=...
> cumsum([sum(s(1:2*n(m)+1,m));...
> s(2*n(m)+2:r,m)-s(1:r-2*n(m)-1,m)])./bb(m);
> end
> w=diff(s')';
> end
> toc
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>

1.561531 seconds on a Lenovo T60 1.83GHz Core Duo running win XP SP2 in
R2008b.

Arnaud

Subject: comparing CPU task speed: proposed experiment

From: alonso hauer

Date: 9 Nov, 2008 22:25:04

Message: 14 of 15


3.046544 seconds !! with a new Macbook, 2.0Ghz and 4.0Mb RAM,
Matlab 2008a, running under Mac OS X Leopard. What can I do to run it faster?. Would it go faster if I run it under windows in mac?.

Subject: comparing CPU task speed: proposed experiment

From: Seyed Iman

Date: 14 Sep, 2009 07:46:54

Message: 15 of 15

"Kevin Johnson" <defer.jof@gmail.com> wrote in message <gdqjl8$57u$1@fred.mathworks.com>...
> All,
>
> I'm looking to buy a new laptop computer and upgrade to the latest MATLAB. I much prefer Macs, but need the best possible (laptop) speed. After reading the forums I am still a bit unsure of the precise differences in performance of various hardware combinations. Inevitably, I know, performance measures depend on the specific task.
>
> My works doesn't use particularly large files, or much I/O or graphics, but involves intensive calculation.
>
> So I'd like to propose a little exerimaent. Below is a snippet of typical code that is called many times. Perhaps if you have a well-appointed laptop you could run it and let me know how long it takes. The we can see the difference in speed between a recent fast PC running Windows, the latest Macbook Pro running MATLAB under OS X, and the same Mac running MATLAB under a Windows simulator.
>
> Thanks,
> Kevin
> P.S. I've looped it 5000 times just to get the total time to something reasonable for comparison. It takes 6.9955 seconds on my PowerBook G4 1.6 GHz. under OS X.
>
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
> load train %load train whistle file into y
> tic
> for w=1:5000
> r=800;
> s=zeros(r,6);
> s(:,1)=y(1:r);
> m=[1:5];
> n=2.^(m-1);
> bb=2.*n+1;
> for m=1:5
> s(n(m)+1:r-n(m),m+1)=...
> cumsum([sum(s(1:2*n(m)+1,m));...
> s(2*n(m)+2:r,m)-s(1:r-2*n(m)-1,m)])./bb(m);
> end
> w=diff(s')';
> end
> toc
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


Did you end up with a conclusion?? What did you buy in the end, I am looking to buy a laptop. I just need a decent performance as I always run my simulations on my Office PC.

What laptop do you recommend,

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
cpu Sprinceana 14 Sep, 2009 03:51:09
cpu speed Sprinceana 14 Sep, 2009 03:51:09
rssFeed for this Thread

Contact us at files@mathworks.com