f



Matlab 6.5.1 slower than Matlab 5.3

Hello everyone,

i've just installed Matlab 6.5.1 on my desktop (2.8 GHz 1GB RAM) but
when I compare its performance to an older version: Matlab 5.3 the
new version is about 3.7 times slower. Running a certain m-file in
5.3 takes about 27 seconds, while running exactly the same m-file in
Matlab 6.5.1 takes about 102 seconds (using tic toc).
Can anyone tell me if this is normal (why then?) ? And if so why
would I wanna use the newer version if it is that much slower?

Ron
0
linksback (73)
6/4/2004 12:36:12 PM
comp.soft-sys.matlab 211266 articles. 18 followers. lunamoonmoon (258) is leader. Post Follow

13 Replies
1575 Views

Similar Articles

[PageSpeed] 48

Yes this is correct. After 5.3, Matlab and Simulink are running much much
slower. Twice the execution time is typical and memory usage of 4X or more
are also common.

I think this is because they are now using Java.

I have all the version after 5.3 but I still used 5.3 everyday.

Leo M.

"Ron Blom" <linksback@yahoo.com> wrote in message
news:eedf554.-1@webx.raydaftYaTP...
> Hello everyone,
>
> i've just installed Matlab 6.5.1 on my desktop (2.8 GHz 1GB RAM) but
> when I compare its performance to an older version: Matlab 5.3 the
> new version is about 3.7 times slower. Running a certain m-file in
> 5.3 takes about 27 seconds, while running exactly the same m-file in
> Matlab 6.5.1 takes about 102 seconds (using tic toc).
> Can anyone tell me if this is normal (why then?) ? And if so why
> would I wanna use the newer version if it is that much slower?
>
> Ron


0
NoSpam9086 (13)
6/4/2004 1:04:12 PM
L. M. wrote:
>
>
> Yes this is correct. After 5.3, Matlab and Simulink are running
> much much
> slower. Twice the execution time is typical and memory usage of 4X
> or more
> are also common.
>
> I think this is because they are now using Java.
>
> I have all the version after 5.3 but I still used 5.3 everyday.
>
> Leo M.
>
> "Ron Blom" <linksback@yahoo.com> wrote in message
> news:eedf554.-1@webx.raydaftYaTP...
>> Hello everyone,
>>
>> i've just installed Matlab 6.5.1 on my desktop (2.8 GHz 1GB
RAM)
> but
>> when I compare its performance to an older version: Matlab 5.3
> the
>> new version is about 3.7 times slower. Running a certain m-file
> in
>> 5.3 takes about 27 seconds, while running exactly the same
m-file
> in
>> Matlab 6.5.1 takes about 102 seconds (using tic toc).
>> Can anyone tell me if this is normal (why then?) ? And if so
why
>> would I wanna use the newer version if it is that much slower?
>>
>> Ron
>
>
>

1) launch Matlab with -nodesktop argument to save memory
2) Replace the provided BLAS lib by a an optimized one : ATLAS or
GOTO BLAS lib to boost your Matrix algebra Kernel

Then your Matlab 6.5.1 will be even faster than the old 5.3.

S�bastien
0
SeBy (232)
6/4/2004 1:31:56 PM
Can you post your code here by any chance? It will help us finding out what
the problem is.

---Bob.


"Ron Blom" <linksback@yahoo.com> wrote in message
news:eedf554.-1@webx.raydaftYaTP...
> Hello everyone,
>
> i've just installed Matlab 6.5.1 on my desktop (2.8 GHz 1GB RAM) but
> when I compare its performance to an older version: Matlab 5.3 the
> new version is about 3.7 times slower. Running a certain m-file in
> 5.3 takes about 27 seconds, while running exactly the same m-file in
> Matlab 6.5.1 takes about 102 seconds (using tic toc).
> Can anyone tell me if this is normal (why then?) ? And if so why
> would I wanna use the newer version if it is that much slower?
>
> Ron


0
bcheng (209)
6/4/2004 1:32:51 PM
Leo and Ron,

Give it a shot with MATLAB 7!!! It has been available since Wednesday and it
includes many performance improvements. If it is still slower than 5.3, then
please send some sample code to support@mathworks.com so that we can
investigate the problem and try to fix it in a future release.

Sean Cote

"L. M." <NoSpam@montrATbellsouth.net> wrote in message
news:Qn_vc.8413$tl4.5429@bignews6.bellsouth.net...
> Yes this is correct. After 5.3, Matlab and Simulink are running much much
> slower. Twice the execution time is typical and memory usage of 4X or more
> are also common.
>
> I think this is because they are now using Java.
>
> I have all the version after 5.3 but I still used 5.3 everyday.
>
> Leo M.
>
> "Ron Blom" <linksback@yahoo.com> wrote in message
> news:eedf554.-1@webx.raydaftYaTP...
> > Hello everyone,
> >
> > i've just installed Matlab 6.5.1 on my desktop (2.8 GHz 1GB RAM) but
> > when I compare its performance to an older version: Matlab 5.3 the
> > new version is about 3.7 times slower. Running a certain m-file in
> > 5.3 takes about 27 seconds, while running exactly the same m-file in
> > Matlab 6.5.1 takes about 102 seconds (using tic toc).
> > Can anyone tell me if this is normal (why then?) ? And if so why
> > would I wanna use the newer version if it is that much slower?
> >
> > Ron
>
>


0
scote (115)
6/4/2004 1:56:23 PM
Main part of the file is ode solver:

[T,Y]=ode45('model_dv',t_record,y0);

function xdot=model_dv(t,x)
%model function-file
home,t
global U V F nom t_span D freq

%linear interpolation of force
F_t=sin(freq*t)*(interp1(t_span,F,t));

xdot=[x(nom+1:2*nom);
      -D*x(nom+1:2*nom)-V*x(1:nom)+U'*F_t']

where U is a matrix containing eigenmodes, V contains eigenvalues, F
contains excitation force over time, D= damping

However as i use the same file in 5.3 as in 6.5 changes in this,
would probably affect both versions equally...(?)

Bobby Cheng wrote:
>
>
> Can you post your code here by any chance? It will help us finding
> out what
> the problem is.
>
> ---Bob.
>
>
> "Ron Blom" <linksback@yahoo.com> wrote in message
> news:eedf554.-1@webx.raydaftYaTP...
>> Hello everyone,
>>
>> i've just installed Matlab 6.5.1 on my desktop (2.8 GHz 1GB
RAM)
> but
>> when I compare its performance to an older version: Matlab 5.3
> the
>> new version is about 3.7 times slower. Running a certain m-file
> in
>> 5.3 takes about 27 seconds, while running exactly the same
m-file
> in
>> Matlab 6.5.1 takes about 102 seconds (using tic toc).
>> Can anyone tell me if this is normal (why then?) ? And if so
why
>> would I wanna use the newer version if it is that much slower?
>>
>> Ron
>
>
>
0
linksback (73)
6/4/2004 2:06:14 PM
SeBy wrote:

> 1) launch Matlab with -nodesktop argument to save memory
> 2) Replace the provided BLAS lib by a an optimized one : ATLAS or
> GOTO BLAS lib to boost your Matrix algebra Kernel
>
> Then your Matlab 6.5.1 will be even faster than the old 5.3.
>
> S�bastien

Thanx S�bastien, but I'm not that familiar with these kind of things.
So I've got a few questions:
1) How do I do this?
2) Does it have other effects besides speed up the calculations (e.g.
will all functionalities stay the same?)

Ron
0
linksback (73)
6/4/2004 2:19:51 PM
"Ron Blom" <linksback@yahoo.com> wrote in message
news:eedf554.4@webx.raydaftYaTP...
> Main part of the file is ode solver:
>
> [T,Y]=ode45('model_dv',t_record,y0);
>
> function xdot=model_dv(t,x)
> %model function-file
> home,t
> global U V F nom t_span D freq
>
> %linear interpolation of force
> F_t=sin(freq*t)*(interp1(t_span,F,t));
>
> xdot=[x(nom+1:2*nom);
>       -D*x(nom+1:2*nom)-V*x(1:nom)+U'*F_t']

This will do lots of printing to the command window. That might very well be
slower in 6.5 than in 5.3. Running in -nodesktop mode as suggested by
another poster would be a good way to test this. If you remove the "home,t"
line and add a semi-colon to the xdot calculation, things should go much
faster.

Rob Henson
The MathWorks, Inc.

> where U is a matrix containing eigenmodes, V contains eigenvalues, F
> contains excitation force over time, D= damping
>
> However as i use the same file in 5.3 as in 6.5 changes in this,
> would probably affect both versions equally...(?)
>
> Bobby Cheng wrote:
> >
> >
> > Can you post your code here by any chance? It will help us finding
> > out what
> > the problem is.
> >
> > ---Bob.
> >
> >
> > "Ron Blom" <linksback@yahoo.com> wrote in message
> > news:eedf554.-1@webx.raydaftYaTP...
> >> Hello everyone,
> >>
> >> i've just installed Matlab 6.5.1 on my desktop (2.8 GHz 1GB
> RAM)
> > but
> >> when I compare its performance to an older version: Matlab 5.3
> > the
> >> new version is about 3.7 times slower. Running a certain m-file
> > in
> >> 5.3 takes about 27 seconds, while running exactly the same
> m-file
> > in
> >> Matlab 6.5.1 takes about 102 seconds (using tic toc).
> >> Can anyone tell me if this is normal (why then?) ? And if so
> why
> >> would I wanna use the newer version if it is that much slower?
> >>
> >> Ron
> >
> >
> >


0
rob2828 (210)
6/4/2004 3:29:58 PM
> 1) launch Matlab with -nodesktop argument to save memory
> 2) Replace the provided BLAS lib by a an optimized one : ATLAS or
> GOTO BLAS lib to boost your Matrix algebra Kernel
>
> Then your Matlab 6.5.1 will be even faster than the old 5.3.
>
> S�bastien

Please, can you give more precise information about this stuff? How
can i Do this in practice?
0
6/4/2004 4:09:25 PM
andrea wrote:
>
>
>> 1) launch Matlab with -nodesktop argument to save memory
>> 2) Replace the provided BLAS lib by a an optimized one : ATLAS
or
>> GOTO BLAS lib to boost your Matrix algebra Kernel
>>
>> Then your Matlab 6.5.1 will be even faster than the old 5.3.
>>
>> S�bastien
>
> Please, can you give more precise information about this stuff? How
> can i Do this in practice?

1) in the property of the matlab desktop shortcut, add the
"-nodesktop" to have something like

\matlabR14\bin\win32\MATLAB.exe -nodesktop

2) Please visit the excellent page of Kevin Sheppard for the ATLAS
lib.

 <http://www.kevinsheppard.com/research/MatlabAtlas/MatlabAtlas.htm>

This page explain how to call the new compiled LIB.

and the GOTO page at :

 <http://www.cs.utexas.edu/users/kgoto/>

You will be able to find in the second on the fastest BLAS lib
available for Intel & AMD on Windows & Linux OS.

Regards,

S�bastien
0
SeBy (232)
6/4/2004 4:40:22 PM
Yes, it is.

Matlab 4.2C is noticeably faster than 5.3 also.
--scott


-- 
"C'est un Nagra.  C'est suisse, et tres, tres precis."
0
kludge (351)
6/4/2004 4:48:12 PM
MATLAB 6.5.1 uses ATLAS BLAS.

Stuart
"SeBy" <SeBy@docky.fr> wrote in message news:eedf554.8@webx.raydaftYaTP...
> andrea wrote:
> >
> >
> >> 1) launch Matlab with -nodesktop argument to save memory
> >> 2) Replace the provided BLAS lib by a an optimized one : ATLAS
> or
> >> GOTO BLAS lib to boost your Matrix algebra Kernel
> >>
> >> Then your Matlab 6.5.1 will be even faster than the old 5.3.
> >>
> >> S�bastien
> >
> > Please, can you give more precise information about this stuff? How
> > can i Do this in practice?
>
> 1) in the property of the matlab desktop shortcut, add the
> "-nodesktop" to have something like
>
> \matlabR14\bin\win32\MATLAB.exe -nodesktop
>
> 2) Please visit the excellent page of Kevin Sheppard for the ATLAS
> lib.
>
>  <http://www.kevinsheppard.com/research/MatlabAtlas/MatlabAtlas.htm>
>
> This page explain how to call the new compiled LIB.
>
> and the GOTO page at :
>
>  <http://www.cs.utexas.edu/users/kgoto/>
>
> You will be able to find in the second on the fastest BLAS lib
> available for Intel & AMD on Windows & Linux OS.
>
> Regards,
>
> S�bastien


0
stuartm (471)
6/4/2004 5:56:16 PM
Rob Henson wrote:
 
> "Ron Blom" <linksback@yahoo.com> wrote in message
> news:eedf554.4@webx.raydaftYaTP...
>> Main part of the file is ode solver:
>>
>> [T,Y]=ode45('model_dv',t_record,y0);
>>
>> function xdot=model_dv(t,x)
>> %model function-file
>> home,t
>> global U V F nom t_span D freq
>>
>> %linear interpolation of force
>> F_t=sin(freq*t)*(interp1(t_span,F,t));
>>
>> xdot=[x(nom+1:2*nom);
>> -D*x(nom+1:2*nom)-V*x(1:nom)+U'*F_t']
>
> This will do lots of printing to the command window. That might
> very well be
> slower in 6.5 than in 5.3. Running in -nodesktop mode as suggested
> by
> another poster would be a good way to test this. If you remove the
> "home,t"
> line and add a semi-colon to the xdot calculation, things should go
> much
> faster.
>
> Rob Henson
> The MathWorks, Inc.
I removed the home,t part, but because I want to be able to see the
progress of the calculation I used the OutputFcn parameter (odeprint)
and OutputSel ([1]). The semi-colon was already in my original file,
I just forgot to copy is I guess. However, even without printing to
the display every step the calculation is slower with Matlab 6.5.

Ron
0
linksback (73)
6/7/2004 7:27:34 AM
Ron,

Is the time diffference mostly due to the screen printing? How long
does it take in each version with the screen printing removed? (It
was 102 seconds for 6.5.1 and 27 seconds for 5.3 before this)

Murphy.

Ron Blom wrote:
>
>
> Rob Henson wrote:
>
>> "Ron Blom" <linksback@yahoo.com> wrote in message
>> news:eedf554.4@webx.raydaftYaTP...
>>> Main part of the file is ode solver:
>>>
>>> [T,Y]=ode45('model_dv',t_record,y0);
>>>
>>> function xdot=model_dv(t,x)
>>> %model function-file
>>> home,t
>>> global U V F nom t_span D freq
>>>
>>> %linear interpolation of force
>>> F_t=sin(freq*t)*(interp1(t_span,F,t));
>>>
>>> xdot=[x(nom+1:2*nom);
>>> -D*x(nom+1:2*nom)-V*x(1:nom)+U'*F_t']
>>
>> This will do lots of printing to the command window. That might
>> very well be
>> slower in 6.5 than in 5.3. Running in -nodesktop mode as
> suggested
>> by
>> another poster would be a good way to test this. If you remove
> the
>> "home,t"
>> line and add a semi-colon to the xdot calculation, things
should
> go
>> much
>> faster.
>>
>> Rob Henson
>> The MathWorks, Inc.
> I removed the home,t part, but because I want to be able to see the
> progress of the calculation I used the OutputFcn parameter
> (odeprint)
> and OutputSel ([1]). The semi-colon was already in my original
> file,
> I just forgot to copy is I guess. However, even without printing to
> the display every step the calculation is slower with Matlab 6.5.
>
> Ron
0
6/10/2004 10:02:33 AM
Reply: