MATLAB on MacBook Pro

Kimo Johnson

11 April 2006

I did some simple testing of MATLAB on my MacBook Pro today. I compared MATLAB running (emulated) in OS X to MATLAB running in XP via Apple's Boot Camp and also in XP using a Parallels virtual machine. The results are somewhat surprising in that I was expecting MATLAB in Boot Camp to be fastest overall, but that isn't always the case.

The times listed below are from running bench(10) and averaging the results. I actually executed bench(10) twice for each test, once to warm the machine up and a second time for the actual test. For those unfamiliar with bench, here is what it tests (taken from the MATLAB documentation):

Test Description Performance Factors
LU LAPACK, n = 1000 Floating point, regular memory access
FFT Fast Fourier Transform Floating point, irregular memory access
ODE Ordinary diff. eqn. Data structures and M-files
Sparse Solve sparse system Mixed integer and floating point
2-D plot(fft(eye)) 2-D line drawing graphics
3-D MathWorks logo 3-D animated OpenGL graphics
OS X
  1.8960    0.5202    0.6114    1.7013    2.6938    2.2483
XP - Boot Camp
  0.7849    0.3880    0.2011    0.5356    0.9143    0.7517
XP - Parallels virtual machine
  0.4563    0.7197    0.1571    0.6858    0.5903    0.7942


I’m surprised by the Parallels virtual machine beating out a native XP installation in a few of the cases, especially in the graphics tests. OS X beat Parallels in the FFT test, but was a factor of 2 or 3 slower in the other tests. Let’s hope a universal build of MATLAB is not too far in the future.