{"id":1918,"date":"2023-12-13T11:39:35","date_gmt":"2023-12-13T16:39:35","guid":{"rendered":"https:\/\/blogs.mathworks.com\/matlab\/?p=1918"},"modified":"2024-01-24T08:04:50","modified_gmt":"2024-01-24T13:04:50","slug":"life-in-the-fast-lane-making-matlab-even-faster-on-apple-silicon-with-apple-accelerate","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/matlab\/2023\/12\/13\/life-in-the-fast-lane-making-matlab-even-faster-on-apple-silicon-with-apple-accelerate\/","title":{"rendered":"Life in the fast lane: Making MATLAB even faster on Apple Silicon with Apple Accelerate"},"content":{"rendered":"<div class = rtcContent><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>Up to <\/span><span>3<\/span><span>.7<\/span><span>x<\/span><span> faster <\/span><span>Matrix-Matrix multiplication, <\/span><span>2x <\/span><span>faster LU factorisation, <\/span><span>1.7x<\/span><span> faster Cholesky <\/span><span>decomposition<\/span><span> and the<\/span><span> <\/span><span>p<\/span><span>otential for many more speed-ups <\/span><span>across different areas of linear algebra in MATLAB<\/span><span>.  <\/span><span>What if I told you that you could have <\/span><span>all of<\/span><span> this right now on <\/span><span>your Apple Silicon machine<\/span><span>?  <\/span><span>Interested<\/span><span>?  <\/span><span>Read on.<\/span><span> <\/span><\/div><h2  style = 'margin: 20px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: 700; text-align: left; '><span>It\u2019s<\/span><span> a<\/span><span>ll about the BLAS<\/span><span> <\/span><\/h2><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><a href = \"https:\/\/www.netlib.org\/blas\/\"><span style=' text-decoration: underline;'>BLAS<\/span><span style=' text-decoration: underline;'> (Basic Linear Algebra <\/span><span style=' text-decoration: underline;'>Subprograms)<\/span><\/a><span> <\/span><span>is <\/span><span>probably the<\/span><span> most important software library <\/span><span>you\u2019ve<\/span><span> never heard of.<\/span><span> <\/span><span>It takes care of things like multiplying <\/span><span>two matrices together or <\/span><span>multiplying vectors by a scalar. Operations so simple you may not even <\/span><span>expect that something like MATLAB would use a library to <\/span><span>perform<\/span><span> them<\/span><span>.<\/span><span> <\/span><\/div><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>The reason we use the BLAS library is speed!<\/span><span> <\/span><span>It\u2019s<\/span><span> <\/span><span>relatively easy<\/span><span> to implement these operations<\/span><span> <\/span><span>if you <\/span><span>don\u2019t<\/span><span> care about speed <\/span><span>but it is certainly not easy to implement them in such a way that they make maximum use of modern hardware<\/span><span>. The difference <\/span><span>in speed <\/span><span>between a naively written matrix-matrix multiplication routine and a high<\/span><span>ly<\/span><span> optimised one can be <\/span><span>thousands of times<\/span><span>! <\/span><span> <\/span><\/div><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>Linear algebra is at the heart of <\/span><span>much of modern technical computing so<\/span><span> c<\/span><span>hip manufacturers<\/span><span>, such as <\/span><span>Intel, AMD and Apple <\/span><span>want to ensure that when you do linear algebra on their hardware <\/span><span>i<\/span><span>t<\/span><span>\u2019<\/span><span>s<\/span><span> <\/span><span>as fast as it can <\/span><span>p<\/span><span>ossibly be<\/span><span>.<\/span><span> As such, they all have their own implementation<\/span><span>s<\/span><span> of the BLAS library<\/span><span>, exquisitely tuned <\/span><span>to perfectly show-off the characteristics of <\/span><span>their CPUs.<\/span><span> <\/span><\/div><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>None of this is news to regular readers of The MATLAB blog of course. I have a minor obsession with the BLAS library, and its <\/span><span>big sibling, the LAPACK library; both of which have been covered multiple times in articles such as <\/span><a href = \"https:\/\/blogs.mathworks.com\/matlab\/2022\/07\/13\/linear-algebra-in-matlab-trying-out-amds-aocl\/\"><span style=' text-decoration: underline;'>Trying out AMD\u2019s AOCL<\/span><\/a><span> and early posts exploring the <\/span><span>beta versions of MATLAB on Apple Silicon<\/span><span> (<\/span><a href = \"https:\/\/blogs.mathworks.com\/matlab\/2022\/05\/05\/exploring-the-matlab-beta-for-native-apple-silicon\/\"><span style=' text-decoration: underline;'>here<\/span><\/a><span> and <\/span><a href = \"https:\/\/blogs.mathworks.com\/matlab\/2022\/12\/08\/playing-with-the-r2022b-matlab-apple-silicon-beta-for-m1-m2-mac\/\"><span style=' text-decoration: underline;'>here<\/span><\/a><span>)<\/span><span>. In these articles you can see how MATLAB\u2019s support of BLAS <\/span><span>has evolved recently, particularly for Apple Silicon.<\/span><span> <\/span><\/div><h2  style = 'margin: 20px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: 700; text-align: left; '><span>You can now use Apple Accelerate <\/span><span>as the BLAS for MATLAB<\/span><span> on Apple Silicon<\/span><span> <\/span><\/h2><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>MATLAB R2023b, the first<\/span><span> general release <\/span><span>of MATLAB for Apple Silicon, <\/span><span>uses<\/span><span> <\/span><span>O<\/span><span>penBLA<\/span><span>S<\/span><span> <\/span><span>and<\/span><span>,<\/span><span> <\/span><a href = \"https:\/\/blogs.mathworks.com\/matlab\/2023\/06\/22\/native-apple-silicon-support-in-the-matlab-simulink-r2023b-pre-release\/\"><span style=' text-decoration: underline;'>as I reported back in <\/span><span style=' text-decoration: underline;'>June<\/span><\/a><span>, <\/span><span>performance is<\/span><span> <\/span><span>p<\/span><span>retty goo<\/span><span>d<\/span><span>.<\/span><span> From the beginning, however, users asked us \u2018Why aren\u2019t you using Apple Accelerate<\/span><span>; which contains <\/span><span>Apple<\/span><span>\u2019<\/span><span>s implementation of BLAS<\/span><span>?<\/span><span>\u2019<\/span><span>.<\/span><span> <\/span><span> We had our reasons (see the <\/span><a href = \"https:\/\/blogs.mathworks.com\/matlab\/2022\/12\/08\/playing-with-the-r2022b-matlab-apple-silicon-beta-for-m1-m2-mac\/\"><span style=' text-decoration: underline;'>relevant section in this article)<\/span><\/a><span> but the situation has since changed and<\/span><span> MathWorks <\/span><span>recently<\/span><span> <\/span><span>released an update <\/span><span>allowing you <\/span><span>to make use of it<\/span><span>. It was done so quietly, however,<\/span><span> that you<\/span><span> <\/span><span>a<\/span><span>lmost certainl<\/span><span>y<\/span><span> <\/span><span>missed it!<\/span><span> <\/span><span>S<\/span><span>o<\/span><span> <\/span><span>l<\/span><span>et\u2019<\/span><span>s<\/span><span> <\/span><span>fix that.<\/span><span> <\/span><\/div><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>You need to be running at least R2023b Update 4<\/span><span>. <\/span><span>Anything earlier than R2023b <\/span><span>isn\u2019t<\/span><span> even running natively on Apple Silicon so start there.<\/span><span> Once you <\/span><span>have<\/span><span> R2023b installed, check which update you are running with the <\/span><span style=' font-family: monospace;'>version<\/span><span> command <\/span><span> <\/span><\/div><div class = 'preformatted-matlab' style = 'margin: 10px 3px 10px 55px; padding: 10px 10px 10px 5px; '><div  style = 'border-left: 0px none rgb(33, 33, 33); border-right: 0px none rgb(33, 33, 33); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px; line-height: 15.6px; min-height: 16px; white-space: pre; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 12px; '><span style=\"white-space: pre\"><span >version <\/span><\/span><\/div><div  style = 'border-left: 0px none rgb(33, 33, 33); border-right: 0px none rgb(33, 33, 33); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px; line-height: 15.6px; min-height: 16px; white-space: pre; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 12px; '><span style=\"white-space: pre\"><span >ans = <\/span><\/span><\/div><div  style = 'border-left: 0px none rgb(33, 33, 33); border-right: 0px none rgb(33, 33, 33); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px; line-height: 15.6px; min-height: 16px; white-space: pre; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 12px; '><span style=\"white-space: pre\"><span style=\"color: #a709f5;\">'23.2.0.2428915 (R2023b) Update 4' <\/span><\/span><\/div><\/div><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>If you are running <\/span><span>on an earlier update, fix that by <\/span><span>clicking on <\/span><span style=' font-weight: bold;'>Help-&gt;Check for Updates<\/span><span> <\/span><span> <\/span><\/div><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><img class = \"imageNode\" src = \"http:\/\/blogs.mathworks.com\/matlab\/files\/2023\/12\/lifeFastLane_1.png\" width = \"271\" height = \"359\" alt = \"\" style = \"vertical-align: baseline; width: 271px; height: 359px;\"><\/img><span> <\/span><\/div><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>Once <\/span><span>that\u2019s<\/span><span> done<\/span><span>, <\/span><span>you can <\/span><span>switch from using <\/span><span>OpenBLAS<\/span><span> to Apple Accelerate by following the instructions at <\/span><a href = \"https:\/\/uk.mathworks.com\/matlabcentral\/answers\/2044632-how-can-i-use-the-blas-implementations-included-in-apple-accelerate-framework-with-matlab-r2023b-upd\/?s_tid=ans_lp_feed_leaf\"><span style=' text-decoration: underline;'>How can I use the BLAS implementations included in Apple Accelerate Framework with MATLAB R2023b Update 4<\/span><\/a><\/div><h2  style = 'margin: 20px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: 700; text-align: left; '><span>Performance <\/span><span>discussion<\/span><span> <\/span><\/h2><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>At the risk of <\/span><span>stating<\/span><span> the obvious, <\/span><span>if what <\/span><span>you\u2019re<\/span><span> interested in <\/span><span>isn\u2019t<\/span><span> related to linear algebra then you are not going to see any performance differences with this change<\/span><span>. <\/span><span>This is MATLAB<\/span><span> though<\/span><span>, <\/span><span>there\u2019s<\/span><span> a lot of linear algebra.<\/span><span> <\/span><span> <\/span><\/div><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>If you want to repeat this benchmarks for yourself, the <\/span><a href = \"https:\/\/github.com\/mathworks\/matlab-blog\/tree\/main\/2023\/lifeFastLane\"><span>script I used is on GitHub<\/span><\/a><\/div><h3  style = 'margin: 15px 10px 5px 4px; padding: 0px; line-height: 18px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 17px; font-weight: 700; text-align: left; '><span style=' font-weight: bold;'>Matrix-Matrix multiplication<\/span><span> <\/span><\/h3><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>Matrix-Matrix multiplication is where I s<\/span><span>aw the most speed-up<\/span><span>.<\/span><span> This is a BLAS operation that has clearly seen a lot of work by Apple. <\/span><span> <\/span><\/div><table  style = 'margin: 3px; border: 1px solid rgb(191, 191, 191); border-collapse: collapse; '><col\/><col\/><col\/><col\/><tr  style = 'background-color: rgba(0, 0, 0, 0); '><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>Matrix Size<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>OpenBLAS<\/span><span style=' font-weight: bold;'> time (s)<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>Apple Accelerate<\/span><span style=' font-weight: bold;'> time (s)<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>x Speed-up<\/span><span> <\/span><\/div><\/td><\/tr><tr  style = 'background-color: rgba(0, 0, 0, 0); '><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>1<\/span><span>,<\/span><span>000<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>0.<\/span><span style=' font-weight: bold;'>0172<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>0.00<\/span><span style=' font-weight: bold;'>46<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>3.<\/span><span style=' font-weight: bold;'>7<\/span><span style=' font-weight: bold;'>4<\/span><span> <\/span><\/div><\/td><\/tr><tr  style = 'background-color: rgba(0, 0, 0, 0); '><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>5,000<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>1.15<\/span><span style=' font-weight: bold;'>83<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>0.4<\/span><span style=' font-weight: bold;'>171<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>2.78<\/span><span> <\/span><\/div><\/td><\/tr><tr  style = 'background-color: rgba(0, 0, 0, 0); '><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>10,000<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>6.<\/span><span style=' font-weight: bold;'>8977<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>3.3186<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>2.08<\/span><span> <\/span><\/div><\/td><\/tr><\/table><h3  style = 'margin: 15px 10px 5px 4px; padding: 0px; line-height: 18px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 17px; font-weight: 700; text-align: left; '><span style=' font-weight: bold;'>LU factorization<\/span><span> <\/span><\/h3><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>LU factorization is a LAPACK <\/span><span>operation<\/span><span> and we <\/span><span>haven\u2019t<\/span><span> changed LAPACK libraries here. However, <\/span><span>LAPACK often makes use of BLAS so if you accelerate BLAS, you get <\/span><span>can<\/span><span> faster LAPACK for free. <\/span><span> <\/span><\/div><table  style = 'margin: 3px; border: 1px solid rgb(191, 191, 191); border-collapse: collapse; '><col\/><col\/><col\/><col\/><tr  style = 'background-color: rgba(0, 0, 0, 0); '><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>Matrix Size<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>OpenBLAS<\/span><span style=' font-weight: bold;'> time (s)<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>Apple Accelerate time (s)<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>x Speed-up<\/span><span> <\/span><\/div><\/td><\/tr><tr  style = 'background-color: rgba(0, 0, 0, 0); '><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>1,000<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>0.0124<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>0.0115<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>1.08<\/span><span> <\/span><\/div><\/td><\/tr><tr  style = 'background-color: rgba(0, 0, 0, 0); '><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>5,000<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>0.4345<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>0.2556<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>1.7<\/span><span> <\/span><\/div><\/td><\/tr><tr  style = 'background-color: rgba(0, 0, 0, 0); '><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>10,000<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>3.5928<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>1.6821<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>2.14<\/span><span> <\/span><\/div><\/td><\/tr><\/table><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span> I also tested <\/span><span>C<\/span><span>holesky<\/span><span> <\/span><span>decomposition <\/span><span>and got speed-ups ranging from<\/span><span> <\/span><span>1.28x to <\/span><span>1.77<\/span><span>x<\/span><span> <\/span><\/div><h3  style = 'margin: 15px 10px 5px 4px; padding: 0px; line-height: 18px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 17px; font-weight: 700; text-align: left; '><span style=' font-weight: bold;'>Eigenvalues<\/span><span> <\/span><\/h3><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>To test <\/span><span>e<\/span><span>igenvalue<\/span><span> <\/span><span>computation<\/span><span> I used the single output version<\/span><span> of<\/span><span style=' font-family: monospace;'> eig<\/span><span>.<\/span><span> <\/span><span style=' font-family: monospace;'>e = eig(A)<\/span><span>.  <\/span><span>As with other <\/span><span>tests, I tried this on a range of random matrices<\/span><span>.  <\/span><span>Things started off well<\/span><span>, with nice speed-ups for small matrices but <\/span><span>larger matrices saw quite <\/span><span>substantial<\/span><span> <\/span><span>slowdowns<\/span><span> on my M2 <\/span><span>machine when compared to the OpenBLAS original.<\/span><\/div><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>I discussed this with a colleague who has an <\/span><span>M1<\/span><span> and he never saw any slowdowns. <\/span><span>For his machine, it was always faster <\/span><span>to use <\/span><span>Apple Accelerate<\/span><span> for <\/span><span>eig<\/span><span>.  <\/span><span>As such, we suspect that this is an M2-speific issue and <\/span><span>will <\/span><span>investigate more closely to find out <\/span><span>what\u2019s<\/span><span> going on here<\/span><span> <\/span><\/div><table  style = 'margin: 3px; border: 1px solid rgb(191, 191, 191); border-collapse: collapse; '><col\/><col\/><col\/><col\/><tr  style = 'background-color: rgba(0, 0, 0, 0); '><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>Matrix Size<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>OpenBLAS<\/span><span style=' font-weight: bold;'> time (s)<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>Apple Accelerate time (s)<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>x Speed-up<\/span><span> <\/span><\/div><\/td><\/tr><tr  style = 'background-color: rgba(0, 0, 0, 0); '><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>1,000<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>0.4245<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>0.24<\/span><span style=' font-weight: bold;'>07<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>1<\/span><span style=' font-weight: bold;'>.<\/span><span style=' font-weight: bold;'>76<\/span><span> <\/span><\/div><\/td><\/tr><tr  style = 'background-color: rgba(0, 0, 0, 0); '><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>5,000<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>22<\/span><span style=' font-weight: bold;'>.86<\/span><span style=' font-weight: bold;'>54<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>24.74<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>0.92<\/span><span> <\/span><\/div><\/td><\/tr><tr  style = 'background-color: rgba(0, 0, 0, 0); '><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>10,000<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>145.4<\/span><span style=' font-weight: bold;'>076<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>201.57<\/span><span> <\/span><\/div><\/td><td  style = 'border: 1px solid rgb(191, 191, 191); vertical-align: top; '><div  style = 'margin: 2px 10px 2px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: break-spaces; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span style=' font-weight: bold;'>0.72<\/span><span> <\/span><\/div><\/td><\/tr><\/table><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span> <\/span><\/div><h2  style = 'margin: 20px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: 700; text-align: left; '><span>Details of test machine<\/span><span> <\/span><\/h2><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>I used a<\/span><span>n<\/span><span> M2-based <\/span><span>Macbook<\/span><span> Pro<\/span><span> that was <\/span><span>plugged<\/span><span>-<\/span><span>in<\/span><span>. The output from the <\/span><a href = \"https:\/\/uk.mathworks.com\/matlabcentral\/fileexchange\/33155-cpu-info\"><span style=' text-decoration: underline;'>cpuinfo command<\/span><\/a><span> <\/span><span>(available on File Exchange) <\/span><span>is as follows<\/span><span>.<\/span><span>  <\/span><span> <\/span><\/div><div class = 'preformatted-matlab' style = 'margin: 10px 3px 10px 55px; padding: 10px 10px 10px 5px; '><div  style = 'border-left: 0px none rgb(33, 33, 33); border-right: 0px none rgb(33, 33, 33); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px; line-height: 15.6px; min-height: 16px; white-space: pre; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 12px; '><span style=\"white-space: pre\"><span >cpuinfo <\/span><\/span><\/div><div  style = 'border-left: 0px none rgb(33, 33, 33); border-right: 0px none rgb(33, 33, 33); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px; line-height: 15.6px; min-height: 16px; white-space: pre; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 12px; '><span style=\"white-space: pre\"><span >ans =  <\/span><\/span><\/div><div  style = 'border-left: 0px none rgb(33, 33, 33); border-right: 0px none rgb(33, 33, 33); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px; line-height: 15.6px; min-height: 16px; white-space: pre; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 12px; '><span style=\"white-space: pre\"><span >  struct<\/span><span style=\"color: rgb(225, 27, 20);\">\u202f<\/span><span >with fields: <\/span><\/span><\/div><div  style = 'border-left: 0px none rgb(33, 33, 33); border-right: 0px none rgb(33, 33, 33); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px; line-height: 15.6px; min-height: 16px; white-space: pre; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 12px; '><span style=\"white-space: pre\"><span > <\/span><\/span><\/div><div  style = 'border-left: 0px none rgb(33, 33, 33); border-right: 0px none rgb(33, 33, 33); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px; line-height: 15.6px; min-height: 16px; white-space: pre; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 12px; '><span style=\"white-space: pre\"><span >        CPUName: <\/span><span style=\"color: #a709f5;\">'Apple M2 Pro' <\/span><\/span><\/div><div  style = 'border-left: 0px none rgb(33, 33, 33); border-right: 0px none rgb(33, 33, 33); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px; line-height: 15.6px; min-height: 16px; white-space: pre; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 12px; '><span style=\"white-space: pre\"><span >          Clock: <\/span><span style=\"color: #a709f5;\">'N\/A' <\/span><\/span><\/div><div  style = 'border-left: 0px none rgb(33, 33, 33); border-right: 0px none rgb(33, 33, 33); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px; line-height: 15.6px; min-height: 16px; white-space: pre; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 12px; '><span style=\"white-space: pre\"><span >          Cache: 65536 <\/span><\/span><\/div><div  style = 'border-left: 0px none rgb(33, 33, 33); border-right: 0px none rgb(33, 33, 33); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px; line-height: 15.6px; min-height: 16px; white-space: pre; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 12px; '><span style=\"white-space: pre\"><span >    TotalMemory: 1.7180e+10 <\/span><\/span><\/div><div  style = 'border-left: 0px none rgb(33, 33, 33); border-right: 0px none rgb(33, 33, 33); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px; line-height: 15.6px; min-height: 16px; white-space: pre; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 12px; '><span style=\"white-space: pre\"><span >        NumCPUs: 1 <\/span><\/span><\/div><div  style = 'border-left: 0px none rgb(33, 33, 33); border-right: 0px none rgb(33, 33, 33); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px; line-height: 15.6px; min-height: 16px; white-space: pre; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 12px; '><span style=\"white-space: pre\"><span >     TotalCores: 10 <\/span><\/span><\/div><div  style = 'border-left: 0px none rgb(33, 33, 33); border-right: 0px none rgb(33, 33, 33); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px; line-height: 15.6px; min-height: 16px; white-space: pre; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 12px; '><span style=\"white-space: pre\"><span >         OSType: <\/span><span style=\"color: #a709f5;\">'macOS' <\/span><\/span><\/div><div  style = 'border-left: 0px none rgb(33, 33, 33); border-right: 0px none rgb(33, 33, 33); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px; line-height: 15.6px; min-height: 16px; white-space: pre; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 12px; '><span style=\"white-space: pre\"><span >      OSVersion: <\/span><span style=\"color: #a709f5;\">'13.3.1' <\/span><\/span><\/div><\/div><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>Other than <\/span><span>the issue with <\/span><span style=' font-family: monospace;'>eig<\/span><span>, w<\/span><span>hich I hope will get fixed at some point, switching to Apple Accelerate seems to be extremely beneficial<\/span><span>.  <\/span><span>If you have an Apple Silicon Mac, <\/span><span>give it a try<\/span><span> and <\/span><span>tell me what you <\/span><span>come up with<\/span><span>.<\/span><span> <\/span><\/div>\r\n<\/div><script type=\"text\/javascript\">var css = ''; var head = document.head || document.getElementsByTagName('head')[0], style = document.createElement('style'); head.appendChild(style); style.type = 'text\/css'; if (style.styleSheet){ style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); }<\/script>","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img src=\"https:\/\/blogs.mathworks.com\/matlab\/files\/2023\/12\/MatMul.png\" class=\"img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" \/><\/div><p>Up to 3.7x faster Matrix-Matrix multiplication, 2x faster LU factorisation, 1.7x faster Cholesky decomposition and the potential for many more speed-ups across different areas of linear algebra in... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/matlab\/2023\/12\/13\/life-in-the-fast-lane-making-matlab-even-faster-on-apple-silicon-with-apple-accelerate\/\">read more >><\/a><\/p>","protected":false},"author":176,"featured_media":1948,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[11,80,29,14],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/matlab\/wp-json\/wp\/v2\/posts\/1918"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/matlab\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/matlab\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/matlab\/wp-json\/wp\/v2\/users\/176"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/matlab\/wp-json\/wp\/v2\/comments?post=1918"}],"version-history":[{"count":4,"href":"https:\/\/blogs.mathworks.com\/matlab\/wp-json\/wp\/v2\/posts\/1918\/revisions"}],"predecessor-version":[{"id":1951,"href":"https:\/\/blogs.mathworks.com\/matlab\/wp-json\/wp\/v2\/posts\/1918\/revisions\/1951"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/matlab\/wp-json\/wp\/v2\/media\/1948"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/matlab\/wp-json\/wp\/v2\/media?parent=1918"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/matlab\/wp-json\/wp\/v2\/categories?post=1918"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/matlab\/wp-json\/wp\/v2\/tags?post=1918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}