Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Xacent

macrumors member
Original poster
Nov 14, 2003
30
3
Canada
I'm a long time user of MATLAB (primarily on PCs) and I've ran 7.01 on my old powerbook G4 for years now. It has always been terribly slow running under X11 emulation but ok for writing programs and limited testing. I was eagerly awaiting the new version for intel macs because I assumed Mathworks would write a native version to run on the new architechture.

After recently getting a new MacBook Pro through work and hearing about the MATLAB for intel macs public beta I downloaded the software and installed it on my new Mac. I couldn't be more disappointed. The new version is still running under X11 emulation and is at least as slow as the previous version. We were looking at buying a couple of maxed out Mac Pros (16k dollar range) to do analysis at work but I don't think there is any point as MATLAB runs at least 10X slower under X11 emulation as it does on Windows.

Needless to say this is heartbreaking. Is there anything I'm missing here? Right now I'm so angry with MathWorks I don't know what to do. Currently the only solution seems to be to run either Parallels or Bootcamp and run MATLAB under a windows partition (to at least enjoy the better performance of the new machines). Any other suggestions out there, maybe I'll have to look into compiling my programs in C+. Damn.

Let me know if you're just as baffled by MathWork's ignorance as I am.
 
So what kind of work are you doing that requires this type of hardware?

I have a copy of the Intel Beta and haven't noticed it to be slow at all. I was actually quite pleased with its performance, after all it is just a beta.
 
I'd be really interested in seeing some benchmarks that demonstrate how slow it is. I'll admit that I haven't worked on a Windows machine much with Matlab, but on my PB G4 1.67GHz Matlab runs quite well and the graphics are reasonably snappy.

You can try Matlab's internal bench.m function (run it with an input argument so that it repeats many times). Share this hear and maybe we can makes some comparisons. There are also framerate programs on the Mathworks file exchange and they might be useful for characterizing graphical speed. I too am about to pop ~$4k on a Mac Pro, but want a sense for the speed I can expect, otherwise I might go Linux (It'll be a dark day when I use a Windows machine!).

Let's try to figure out if it is a problem with your machine and installation, the beta version, or something else.
 
I watched my processor on iStat pro while running this, never went above 50% usage.
 

Attachments

  • Picture 1.jpg
    Picture 1.jpg
    130.9 KB · Views: 254
Without going into too much detail the analysis is a frame by frame , pixel by pixel analysis of paired avi sequences (videos of blood flow). MATLAB on OS X handles loading and writing avis poorly to say the least which appears to be the major bottleneck. Having to wait 10 times as long to process a video that should take 3 minutes isn't a big deal when you're doing one but when you're have thousands to do it sort of becomes and issue.

My bottom line is that MATLAB shouldn't run slower on a brand new MacBook Pro than it does on a 7 year old home PC. Maybe this isn't the case for all MATLAB processes but its definitely the case with processing avis. Even though its a Beta all they've done is make it run on intel macs, they're still running it on X11 which is clearly not optimal (read emulated).
 
Here are the results from my two notebooks and their specs. I'm installing 6p5 on my home PC for reference as I type this. I'll have to wait until Monday to compare it with the workstations in the office. Also I'm sure it could also be program specific so I'll have to put runtime counters in my programs to see the difference there.

Powerbook G4 1.33GHz, 1.5Gig RAM, 80Gig Fujitsu 4200RPM (I think)

LU 0.8662
FFT 0.9378
ODE 0.6317
Sparse 1.1438
2-D 1.9021
3-D 1.3861


MacBook Pro C2D 2.33GHz, 3Gig RAM, 160Gig Hitachi 5400RPM

LU 0.3082
FFT 0.3691
ODE 0.7989
Sparse 1.5520
2-D 1.2192
3-D 1.9940


Forgive me if I don't take a company's internal benchmark as gospel as to how it performs in the real world. These are pretty low level challenges to both these Macs and I was getting as much as 100% variation between runs with the LU test on both machines. Regardless the difference beteween the two, the result ranges from 3 times better to 20% worse. Look at the specs of the two notebooks (the MBP on paper is hugely superior), there is nothing to be impressed about comparing the MBPs result to the three year old Powerbook.
 
Just another thing to add, my understanding when I read about the new MATLAB version was that it would be a native application on OS X for intel. This might have been my imagination (or maybe a dream) but in my opinion MATLAB running under X11 is in no way a native OS X app.

From the mathworks website:

http://www.mathworks.com/support/solutions/data/1-25L41S.html?solution=1-25L41S

The question asks when will MATLAB be available as a native app, their answer is that an Mactel version is under development. I call that misleading at best.
 
New to Macs, can you explain exactly what is going on when programs run through X11.

Using the X11 environment is an easy way of porting apps from linux.
You get a horrible other dock process called X11 when you open up an app that works in it (e.g. OpenOffice or Gimp), the interfaces are the antitheses of mac GUIs. It is not ideal, but it is not an emulator. NeoOffice is a good example of the move from X11 to aqua.
 
Just another thing to add, my understanding when I read about the new MATLAB version was that it would be a native application on OS X for intel. This might have been my imagination (or maybe a dream) but in my opinion MATLAB running under X11 is in no way a native OS X app.

From the mathworks website:

http://www.mathworks.com/support/solutions/data/1-25L41S.html?solution=1-25L41S

The question asks when will MATLAB be available as a native app, their answer is that an Mactel version is under development. I call that misleading at best.
Maybe by the final release? Maybe they mean native as not running under Rosetta, native x86.
 
I guess my perception of emulation doesn't fit with the definition. For me, OS X running a program that was written to run on a completely different OS is in my mind an emulation, but I could be completely wrong on that.

I guess it is running on the x86 architechture, maybe that is considered to be native. In any event its slow (unless someone wants to contest the definition of slow ;).

Right now I'm running a bench(100) on both notebooks. I'll average the result and post it back here, that should make for a fairly good comparison at least for the purposes of the bench program.
 
Both laptops crashed out of the 100 run benchmark when it tried to display the results (couldn't get the averages b/c of the crash). Rerunning them with only 10 repeats gave the following means (sorry I'm too bored to run more than 10 again):

MBP

LU 0.1419
FFT 0.3233
ODE 0.7391
Sparse 1.2516
2-D 0.9967
3-D 1.8902


PowerBook

LU 0.8601
FFT 1.0018
ODE 0.6177
Sparse 1.2182
2-D 1.9053
3-D 1.4770


AMD 1GHz, 768MB RAM, 128MB Raedon 9200, Maxtor 80Gig 7200RPM (No jokes pls I know this machine sucks)

LU 1.2977
FFT 2.1231
ODE 0.7000
Sparse 1.2890
2-D 0.9986
3-D 0.5407


Again take note that my home PC is around 7 years old and it is on par or beats the MBP in 4/6 of the benchmark tests.
 
So what kind of work are you doing that requires this type of hardware?

I have a copy of the Intel Beta and haven't noticed it to be slow at all. I was actually quite pleased with its performance, after all it is just a beta.

i agree. works fine for me, but i'm just in a matlab class, so just small programs
 
A few thoughts...

I know that The Mathworks has stated before that comparing bench.m across machines is fine, but ONLY if they are running the same version of Matlab, as the bench.m function has changed over the years as machines have gotten faster. I know there are differences between 6.5 and 7.x, so be careful if that is the case with the machines you are testing.

Graphics speed under OS X with Matlab has always been poor to fair. If you look closely at the bench results it looks like OS X machines are stuck in the mud when it comes to grahpics. Depending upon your work this may, or may not, really matter to you. Furthermore, their read/write support of AVIs is poor and this may be a specific problem for you.

It looks like the OSX machines are performing well for LU decomposition and FFTs, so-so for ODE solving and Sparse inverses, and fairly poor for graphics.

I guess my real point is that the speed is likely to be application dependent. It's unfortunate that The Mathworks does have optimal support for OS X. I've convinced myself that even if the software is slower, I'll ultimately get my work done faster because I won't have to futz with Windows.
 
Good points about different versions of bench. Going through the code of bench programs on all three computers there are some very minor differences. Mostly the differences have to do with displaying the results. However, the sparse test uses an n of 120 in the older version (found on both my PC running 6.5 and Powerbook running 7.01) vs 300 in the new one.

I ran the old version on the MBP and the only test that got a different result was Sparse, which was a huge improvement down to 0.2039 (from 1.5520). So that changes my impression a bit.

I totally agree about futzing with windows, though MATLAB crashes at least as frequently under OS X as it does in windows (sadly). Our windows workstations are fairly stable, but the only thing that they're running is MATLAB and while the analysis is grinding its common practice to 'not touch anything'. But faster is still faster. I just don't think its too much to ask for an OS X version that runs as fast as the windows one.:mad:
 
Performance on Mac and performance of betas

Hi,

I am a Mac Developer at the MathWorks. In general, you should not compare the performance of a beta to released version of products. The performance will be generally lower, and in specific cases much lower.

The MathWorks releases betas with asserts enabled, which impacts performance substantially. The Intel Mac beta also has the MATLAB interpreter Just-In-Time (JIT) disabled, which further impacts performance. Also, the OpenGL stub library (glren.dylib) was not present, and this impacts performance of figure graphics that use OpenGL, including the Bench 3D result. The final R2007a release will have asserts disabled, the JIT enabled, the OpenGL stub library present, and more, so the Bench results and performance overall will be substantially better.

As always, thank you for your candid feedback.
 
Hi,

I am a Mac Developer at the MathWorks. In general, you should not compare the performance of a beta to released version of products. The performance will be generally lower, and in specific cases much lower.

The MathWorks releases betas with asserts enabled, which impacts performance substantially. The Intel Mac beta also has the MATLAB interpreter Just-In-Time (JIT) disabled, which further impacts performance. Also, the OpenGL stub library (glren.dylib) was not present, and this impacts performance of figure graphics that use OpenGL, including the Bench 3D result. The final R2007a release will have asserts disabled, the JIT enabled, the OpenGL stub library present, and more, so the Bench results and performance overall will be substantially better.

As always, thank you for your candid feedback.

Thanks for the info. I have been very pleased with the improvement in general UI snappiness with the Intel Beta compared to the 2-year old version of Matlab (v. 14R1 It think?) I use on my 12" PowerBook. However, I was disappointed with the bench results. It seems reasonable that a beta would have certain things setup differently than a final version. I'm looking forward to the final release.
 
Hi,

I am a Mac Developer at the MathWorks. In general, you should not compare the performance of a beta to released version of products. The performance will be generally lower, and in specific cases much lower.

The MathWorks releases betas with asserts enabled, which impacts performance substantially. The Intel Mac beta also has the MATLAB interpreter Just-In-Time (JIT) disabled, which further impacts performance. Also, the OpenGL stub library (glren.dylib) was not present, and this impacts performance of figure graphics that use OpenGL, including the Bench 3D result. The final R2007a release will have asserts disabled, the JIT enabled, the OpenGL stub library present, and more, so the Bench results and performance overall will be substantially better.

As always, thank you for your candid feedback.

That sounds more promising at least. But if MATLAB is still running under X11 for the final release I'm sure it will be much slower than the windows version. Maybe Brian can comment on that aspect.

I desperately want MATLAB to run well under OS X so that we can justify buying Mac Pros for analysis stations.

In any event, thank you so much Brian for your comment. You're keeping the hope alive.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.