分析效率代码? [英] Analyzing Code for Efficiency?

查看:87
本文介绍了分析效率代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您使用哪种工具来确定代码的效率?您是否使用运行统计上显着数量的测试的家用应用程序或某些商业产品?您是否使用自己的知识来测试代码的某些区域,或者某些工具来分析代码中的弱点?

What kinds of tools do you use to determine the efficiency of code? Do you use home grown applications that run a statistically significant number of tests, or some commercial product? Do you use your own knowledge to test certain areas of your code, or some tool that analyzes your code for weak spots?

推荐答案

这称为分析。对于各种不同的语言,有许多可用的现成工具可以帮助您确定应用程序中的瓶颈在哪里。例如,用于Java的 TPTP 组工具可以向您展示性能瓶颈归结于各个方法的地方水平,如果你想要的话。当然,有时您真正需要的只是读取系统计时器,以获取有关一段代码的一般信息。

This is called profiling. There are lots of off-the-shelf tools available to help you determine where the bottlenecks in your applications are, for all kinds of different languages. For example, the TPTP set of tools for Java can show you where performance bottlenecks are down to the individual method level, if you want it to. Of course, sometimes all you really need is a couple of reads of the system timer to get a general idea about a section of code.

这篇关于分析效率代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆