简体   繁体   English

比较不同编程环境下的墙面时间和资源使用情况

[英]Comparing wall time and resource usage across different programming environments

Is there a particular software resource monitor that researchers or academics use to compare execution time and other resource usage metrics between programming environments? 研究人员或学者是否使用特定的软件资源监视器来比较编程环境之间的执行时间和其他资源使用情况指标? For instance, if I have a routine in C++, python and another in Matlab, that are all identical in function and similar implantations -how would I make an objective, measurable result comparison as to which was the most efficient process. 例如,如果我在C ++,python中有一个例程,在Matlab中又有一个例程,它们在功能和植入方面都相同,那么我将如何进行客观,可测量的结果比较,以了解哪个是最有效的过程。 Likewise is it a tool that could also analyze performance between versions of the same code to track improvements in processing efficiency. 同样,它是一种工具,也可以分析相同代码版本之间的性能,以跟踪处理效率的提高。 Please try to answer this question without generalizations like "oh, C++ is always more efficient than python and python will always be more efficient than Matlab." 请尝试回答这个问题,不要笼统地说:“哦,C ++总是比python更高效,而python总是比Matlab更高效”。

The correct way is to write tests. 正确的方法是编写测试。 Get current time before actual algo starts, and get current time after it ends. 在实际算法开始之前获取当前时间,在实际算法结束之后获取当前时间。 There are ways to do that in c++ , python and matlab You must not think of results as they are 100% precision because of system scheduling process etc, though it is a good way to compare before-after results. c ++pythonmatlab中有多种方法可以做到这一点。由于系统调度过程等原因,它们绝对是100%的精度,尽管这是比较前后结果的好方法,但您不必考虑结果。 Good way to get more precision results is to run your code multiple times. 获得更精确结果的好方法是多次运行代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何有效地让 python 模块在不同环境中工作 - How to effectively get python modules working across different environments 如何跨不同的编程语言分享业务概念? - How to share business concepts across different programming languages? Python class 跨线程变量使用具有不同的值 - Python class variable usage across thread have different value 在Python中的不同virtualenv环境中共享同版本的egg依赖项 - Sharing same-version egg dependencies across different virtualenv environments in Python 跨平台传输 Conda 环境 - Transferring Conda environments across platforms 跨不同时间序列的异常检测技术? - Techniques for anomaly detection across different time series? 使用HDFS在不同的python进程之间共享资源(文件) - Sharing a resource (file) across different python processes using HDFS Python 比较不同的时间值以获得以分钟为单位的时间增量 - Python comparing to different time values to get time delta in minutes 管理不同环境的配置 - Managing configurations for different environments 不同的搜索结果在不同的环境中 - Different search results in different environments
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM