Consider this example(taken from Thomas's question here)

rv = RandomVariate[ExponentialDistribution[2], 10^6];
t = AbsoluteTime[]; ListLinePlot[rv, PlotRange -> All]
AbsoluteTime[] - t (*Put this line into the NEXT cell,and evaluate \
both cells together*)

t = AbsoluteTime[];
Style[ListLinePlot[rv, PlotRange -> All], Antialiasing -> False]
AbsoluteTime[] - t (*This line in separate cell!*)

and this example (taken from a related question here)

ls = Table[Sinc[x*y], {x, -10, 10, 0.1}, {y, -10, 10, 0.1}];
ListPlot3D[ls, PlotRange -> All, 
  InterpolationOrder -> 2] // AbsoluteTiming

I get different performance in version 8 and version 9. Version 8 seems to be about twice as fast as version 9. Why this happens and how to make version 9 as fast as version 8?

enter image description here enter image description here

  • $\begingroup$ since I have both installed, i get ~7 sec with v9 vs 6 sec with v8 for your second example. $\endgroup$
    – george2079
    May 29, 2013 at 18:33
  • $\begingroup$ If I had to guess, I would guess Mathematica didn't change anything about their internals, but Mac OSX forced new compiled applications to use newer APIs. Mathematica 8.0 is using the old APIs which just happen to be faster then the new API that Mathematica 9.0 is being forced to use. I have experienced such speed changes, when Mac has down this before. Are using and older laptop/computer? The newer API's are probably be partially virtualized, while the older API's are using native hardware. $\endgroup$
    – William
    May 29, 2013 at 19:24
  • 2
    $\begingroup$ isn't that how software evolution works: newer versions fix some bugs, add others and become slower :-) $\endgroup$ May 30, 2013 at 11:04
  • $\begingroup$ fwiw my relatively smaller slowdown was with windows. $\endgroup$
    – george2079
    May 30, 2013 at 12:24
  • $\begingroup$ @Liam does that means other softwares also experience the same problem as MMA does? But I seems not notice the problem in Matlab. $\endgroup$ May 30, 2013 at 15:01


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.