Why does the silicon version of MATLAB run slower on macOS?

46 Ansichten (letzte 30 Tage)
Jack Morrow
Jack Morrow am 17 Jan. 2024
Kommentiert: Michelle Hirsch am 17 Jan. 2024
I recently downloaded version 2023b for macOS on my M2 MacBook, and to see how much better it would be than the version optimised for intel, I timed one of my fluid mechanics simulations on 2023b and 2021b (the version I previously had installed). I was surprised to see that it took 155 seconds in 2021b and 175 seconds in 2023b. I'm using the Amazon Correto 8 Java runtime, which is the one MathWorks suggests. Is there any reason the supposedly optimised version is performing worse, and is there anything I can do to improve this?
Thanks!

Antworten (1)

Michelle Hirsch
Michelle Hirsch am 17 Jan. 2024
A lot could have changed between 21b and 23b, so it's possible that the performance degradation comes from something else getting slower that is unrelated to the architecture change. If practical, I recommend that you install the Intel version of 23b so you can do an apples-to-apples comparison.
Feel free to reach out to tech support. They could dig in with you on your specific code to figure out if something else is going on.
I'll also reach out to people at MathWorks who know a lot more about this than I do to see if we have any more ideas.
  1 Kommentar
Michelle Hirsch
Michelle Hirsch am 17 Jan. 2024
One of our performance experts told me about a whole bunch of reasons why Apple silicon could potentially be slower for a specific operation (memory management, multithreading, LLVM performance, etc). He said he'd be happy to investigate if you are able to share your code (if it's not just a performance regression from 21b to 23b). If you reach out to tech support, point them to this discussion and I can help make sure it gets esclated to him.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange

Produkte


Version

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by