Continuous deterioration of performance on Apple silicon
Show older comments
I work on Apple machines and when the native prerelease of MATLAB 2023b came out I felt great enthusiasm for its calculation speed, especially in parallel ("Threads" mode). My M1 Pro processor ran the usual file that I use as benchmark in about 12 seconds, then when I switched to the official release I started to notice a strong degradation in performance. For example, with update 5, the time taken was approximately 27 seconds and with the 2024a prerelease the calculation time further increased to 34 seconds. This is very scary to me.
At the moment I have not yet tested the 2024a prerelease on my other M3Pro macbook which for the record with update 5 stops the clock at 32 seconds, therefore even slower than the M1pro model. Unfortunately I don't have the times with the previous updates available but from memory I remember a constant and progressive worsening which is also confirmed in the benchmarks in "Processes" mode. I close by saying that the operating system installed on the two machines in question is Sonoma and that they are cloned, therefore they have the same configuration.
What do I need to do to be able to observe MATLAB 2023b native prerelease performance again?
Thanks in advance,
Gianluca
3 Comments
Damian Pietrus
on 23 Jan 2024
Hello Gianluca,
The R2023a Prerelease is no longer available, but I would be curious to see what your benchmarking code looks like and how performance compares between R2023b and the R2024a Prerelease for the Apple silicon versions of MATLAB.
Tim
on 19 Feb 2026
Frankly I'm very disappointed at the lack of support for Apple silicon for many coder support packages. Being unable to use the Mac GPU is also frustrating.
Walter Roberson
on 19 Feb 2026
Apple is notorious for not documenting how the Silicon GPUs actually work, and instead only documenting limited APIs for it. It is fine if you happen to be doing one of the work-flows that Apple choose for you, but it is near impossible to get full GPU performance if you are doing something a little different than the pre-choosen paths. And when you go ahead and experiment to find something that imperically works, Apple feels free to declare that the approach you took is forbidden, or to lock out the approach you took, or to implement the next generation GPU in a way that your approach hardly works. Apple mostly refuses to work with companies to get custom GPU work going properly, saying that companies out to stick strictly to what is documented.
The performance drops due to not using tuned code can be about 32 times compared to the potential peak performance.
Answers (2)
Gian23
on 21 Jan 2024
1 vote
3 Comments
Hassaan
on 21 Jan 2024
R2023b is fully released. The current pre-release is R2024a.
-----------------------------------------------------------------------------------------------------------------------------------------------------
If you find the solution helpful and it resolves your issue, it would be greatly appreciated if you could accept the answer. Also, leaving an upvote and a comment are also wonderful ways to provide feedback.
Professional Interests
- Technical Services and Consulting
- Embedded Systems | Firmware Developement | Simulations
- Electrical and Electronics Engineering
It's important to note that the advice and code are based on limited information and meant for educational purposes. Users should verify and adapt the code to their specific needs, ensuring compatibility and adherence to ethical standards.
Feel free to contact me.
Gian23
on 21 Jan 2024
Walter Roberson
on 21 Jan 2024
The installer for R2023b prerelease is no longer available.
Hassaan
on 20 Jan 2024
0 votes
- Performance Profiling: Use MATLAB's built-in profiler to identify if specific functions or operations are causing the slowdown. This can help pinpoint whether the issue is with certain MATLAB functions or with the overall environment.
- Check for Compatibility and Updates: Ensure that all software, including MATLAB and your operating system (Sonoma), are up to date. Sometimes, performance issues are addressed in subsequent updates.
- Hardware Acceleration Settings: Check if MATLAB is correctly utilizing the hardware acceleration available on your M1 Pro and M3Pro processors. MATLAB should automatically leverage Apple's Metal API for graphics rendering on these chips.
- MATLAB Configuration: Revisit MATLAB's parallel computing settings. Ensure that the configurations (like the number of threads in "Threads" mode) are optimized for your specific hardware.
- Compare Versions: If possible, reinstall the MATLAB 2023b native pre-release version to confirm that the performance difference is due to the software update and not other changes in your system.
- Contact MathWorks Support: Report this issue to MathWorks Support with detailed information. They might have more insights, especially if this is a known issue with specific MATLAB versions on Apple Silicon.
- Community Feedback: Check MATLAB user forums or communities to see if other users with similar hardware have experienced the same issues and if they have found any workarounds.
- Alternative MATLAB Environments: Consider using MATLAB Online or MATLAB Mobile to see if the performance issue persists in these environments.
- System Monitoring: Use macOS’s system monitoring tools to observe any unusual CPU, memory, or disk usage that could be impacting MATLAB’s performance.
- Clean Installation: As a last resort, try a clean installation of MATLAB. This can sometimes resolve hidden configuration issues.
Remember, performance can be influenced by a variety of factors, including changes in the underlying algorithms used by MATLAB between versions. It's also possible that updates to the operating system or the MATLAB software may not be fully optimized for the newest Apple Silicon chips yet.
-----------------------------------------------------------------------------------------------------------------------------------------------------
If you find the solution helpful and it resolves your issue, it would be greatly appreciated if you could accept the answer. Also, leaving an upvote and a comment are also wonderful ways to provide feedback.
Professional Interests
- Technical Services and Consulting
- Embedded Systems | Firmware Developement | Simulations
- Electrical and Electronics Engineering
It's important to note that the advice and code are based on limited information and meant for educational purposes. Users should verify and adapt the code to their specific needs, ensuring compatibility and adherence to ethical standards.
Feel free to contact me.
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!