选择计算机运行MATLAB和SIMULINK产品s manbetx 845万博1manbetx

难以预测MATLAB在特定计算机上运行应用程序时的性能。Mathworks提供了有关平台选择标准的一般指南,并强调它不能代替在特定计算机上测试您的应用程序。

内容


Operating Systems

MATLAB性能在Windows上相似®, 苹果系统®X, and Linux®,尽管由于以下原因,平台之间可能发生差异:

  • Mathworks在每个平台上使用不同的编s manbetx 845译器来构建其产品,并且每个编译器都有自己的性能特征。
  • Mathworks将第三方库纳入其产品中,这些产品可能在每个平台上执行不同的性能。s manbetx 845
  • 操作系统执行differently, especially in the case of disk- or graphics-intensive operations.

In general, performance differences in operating system releases (for example, between Windows 7 and Windows 8) are negligible.


硬件注意事项

典型计算机配置的每个组件都会影响MATLAB性能。

Central Processing Unit (CPU)

带有计算机更多的CPU核心可以胜过核心计数较低的人,但结果会随MATLAB应用程序而变化。MATLAB自动使用多线程来利用许多MATLAB应用中发现的自然平行性。但并非所有MATLAB函数都是多线程,并且加速随算法而变化。为了额外的功能,并行计算工具箱提供并行编程结构,更直接地利用多个计算机内核。

MATLAB性能取决于浮点硬件的存在。在许多CPU上,浮点单元(FPU)的数量等于CPU内核的数量。但是,在某些处理器上,可以在多个CPU内核之间共享单个FPU,从而可能产生性能瓶颈。

虚拟内核may modestly improve overall system performance, but they are likely to have little effect on the performance of MATLAB applications. Simultaneous多线程外观表明计算机的核心比实际的两倍。当使用Windows Task Manager之类的工具时,MATLAB可能仅使用计算机上可用的CPU内核的一半,而实际上“未使用”的一半实际上是通过超线程创建的虚拟内核。

记忆

您的电脑可能会受苦performance degradationdue to打击when MATLAB and the programs you run concurrently with it use more than the available physical memory and your computer must resort to virtual memory. If, while running a MATLAB application, you find your computer is using little of the CPU, you may be experiencing thrashing. To detect thrashing on a Windows platform, useWindows Performance Monitor。在Mac上,使用活动监视器

硬盘

硬盘速度是MATLAB启动时间的重要因素。MATLAB运行后,磁盘速度仅是MATLAB应用程序的性能配置文件由文件I/O主导的情况,或者您的系统使用虚拟内存(请参阅记忆部分)。对于磁盘密集型MATLAB应用程序或改善MATLAB的启动时间,您可以利用诸如固态驱动器orRAID

用于显示的图形处理单元(GPU)

MATLABGraphics are rendered using OpenGL technology, so a graphics card with superior OpenGL support can outperform a lesser card. Up-to-date drivers are recommended for the best visual appearance and robustness.

用于计算的图形处理单元(GPU)

speed up computation,,,,并行计算工具箱利用具有计算能力3.0或更高的Compute功能的NVIDIA GPU。对于R2017B及更早的版本,计算能力2.0就足够了。对于R2014A及更早的版本,计算能力1.3就足够了。

查看所有NVIDIA GPU的计算功能。MATLAB此时不支持使用AMD万博1manbetx或Intel GPU的计算加速度。


Benchmarking Your Program

Matlab提供了built-in benchmarking utilitybenchthat provides a general sense of MATLAB performance on a particular computer, but it cannot reliably predict how any particular MATLAB application will run. Use the MATLAB function时间段帮助生成可靠且可重复的性能基准。采用Gputimeit为基准GPU代码。