什么是样板代码,热点代码和热点? [英] What is Boilerplate code, Hot code and Hot spots?

查看:273
本文介绍了什么是样板代码,热点代码和热点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这些术语用于绩效实现/优化.

I know these terms are used in context of performance achievement/optimization.

最近一直在努力,并尝试进行搜索;但没有得到任何示例,这些示例通过在现实世界中的开发场景中实现这些问题/概念来清楚地阐述/描述了这些概念.

Recently have been working on that, and have tried searching; but didn't get any example, which clearly elaborate/describe these concepts with the realization of these problems/concepts in real world development scenarios.

有人可以彻底解释这些术语,示例方案以及可能使用这些概念和术语的地方.

Can somebody please thoroughly explain these terms, example scenarios, and where these concepts and terms are likely used.

谢谢.

推荐答案

样板"与性能无关:它只是表示定义应用程序或使用某些框架所需的标准代码.该代码在每个应用程序中可能都是相同的.

"Boilerplate" has nothing to do with performance: it just means standard code that is required to define an application or work with some framework. It's code that is likely to be identical in every application.

另一方面,热点"是指多次执行的代码部分,因此其性能对整个应用程序性能至关重要.通常,热点是通过实际分析来确定的:如果多次执行,则不是热点,但是琐碎的琐事对性能的影响很小.

A "hot spot", on the other hand, means a part of the code that is executed many times and therefore its performance matters a lot to the overall application performance. Usually a hot spot is identified by actual profiling: it's not a hot spot if it's executed many times but is so trivial that its impact on performance is minimal.

这篇关于什么是样板代码,热点代码和热点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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