Why does the silicon version of MATLAB run slower on macOS?
조회 수: 39 (최근 30일)
이전 댓글 표시
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!
댓글 수: 0
답변 (1개)
Michelle Hirsch
2024년 1월 17일
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
Michelle Hirsch
2024년 1월 17일
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.
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!