When does CPU matter? (MBA vs MBP for Matlab/Mathematica)

Discussion in 'Buying Tips and Advice' started by fliptomato, Jan 19, 2011.

  1. fliptomato Guest

    #1
    Hi everyone,

    I'm a graduate student in physics and am looking towards purchasing a Macbook Air or Macbook Pro (13") as my primary computer. *Most* of what I do is relatively low-key (web, coding, playing with photoshop/illustrator), however I will need to occasionally run Mathematica/Matlab/numerical codes.

    I'm leaning towards the MBA because portability is important and it is comparable in performance to one of the current 13" MBPs if I go for the 2.2 GHz processor and up 4 gigs of RAM.

    I know that for most applications RAM is the limiting factor, but my question is this: for Mathematica/Matlab/number crunching (some of my longer codes can take several hours on my current 2.4 GHz macbook), will the difference in processor speed significantly affect my computation time? (And will it cause the MBA to run warmer, as it has for my current macbook?)

    Thanks for your input!
    Flip

    PS -- Like many others who are thinking of buying a laptop, I'm also weighing the MBA "right now" versus waiting to see what the MBP upgrades are like later this year.
     
  2. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #2
    Have you profiled your number crunching code to see where the bottleneck actually is? Are you CPU bound? Memory bound? I/O bound?

    Unfortunately you really can't tell unless you actually try it. e.g. I found that for some of my MATLAB code that ran for hours it actually ran faster on my 2.8 GHz Core 2 Duo MBP than an i5 520 based Dell. (Both running MATLAB under W7 64 bit). Boy all benchmarks the i5 should have been about 10% better, but the MBP beat it by about 10% (which, when a job takes hours is real time).

    B
     
  3. fliptomato thread starter Guest

    #3
    Hi B, thanks for the reply! Unfortunately I have no idea how to profile my code to check the bottleneck. (Is this easy to do?)

    Thanks,
    F
     
  4. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #4
    MATLAB has an awesome profller. http://www.mathworks.com/help/techdoc/matlab_env/f9-17018.html I'm sure Mathematica has something similar, but I haven't used it in over 15 years.

    B
     
  5. al2o3cr macrumors regular

    Joined:
    Oct 14, 2009
    #5
    You may not even need full-on profiling: you can get a good idea of what's holding things up by installing something like MenuMeters and/or watching Activity Monitor closely while your code is running.

    If you see the Matlab / Mathematica process sitting at 100%+ CPU for an extended period, you're probably CPU bound.

    If the "Available Memory" stat drops to near zero, you're probably memory bound, even more so if the swap usage goes way up.

    If you see the disk reading/writing like crazy (and you're not swapping) and the processor is spending a lot of time waiting (low CPU usage), then you're disk bound.

    Traditional profiling is able to dig deep and tell you *which* parts of the code are hitting the limits, but for your purposes you're really only interested in figuring out which parts of the system need to be fast.
     

Share This Page