官术网_书友最值得收藏!

Benchmarking

It's difficult to compare the performance of algorithms simply by looking at their descriptions or pseudocode. It's better to run actual implementations on a real system. This method of measurement is called benchmarking. There are three categories of benchmark:

  • Microbenchmarks: These are metrics showing the performance of certain functions. They assume that a small piece of business logic is contained in a single function, and we simply measure how fast this function runs.
  • Macrobenchmarks: These are the opposite of microbenchmarks; they test the entire application.
  • Mesobenchmarks: These are something in-between, measuring features or workflows.

Large applications more or less contain certain critical pieces of code. The JVM is an adaptive virtual machine, meaning it optimizes running code in many ways. Obtaining metrics that are meaningful is actually difficult, which is why microbenchmarks are the most interesting for developers.

主站蜘蛛池模板: 武强县| 习水县| 光山县| 沁阳市| 个旧市| 礼泉县| 卓资县| 巨野县| 南雄市| 长治市| 龙南县| 项城市| 唐山市| 抚宁县| 长武县| 神农架林区| 从化市| 南江县| 渭源县| 旺苍县| 庆云县| 鲜城| 江山市| 南江县| 资阳市| 驻马店市| 武乡县| 错那县| 博兴县| 江北区| 昭觉县| 如东县| 安吉县| 泰顺县| 青海省| 民权县| 铜山县| 永川市| 乐亭县| 寿宁县| 积石山|