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

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.

主站蜘蛛池模板: 毕节市| 广元市| 湖州市| 区。| 和硕县| 纳雍县| 黄山市| 大兴区| 北海市| 浦北县| 汉沽区| 阳东县| 涞源县| 日喀则市| 定安县| 文水县| 神农架林区| 渝北区| 庄河市| 桑植县| 宁夏| 来凤县| 白山市| 图木舒克市| 井冈山市| 西乡县| 宁晋县| 太原市| 德兴市| 什邡市| 泸定县| 雅安市| 和硕县| 梧州市| 洛宁县| 内乡县| 东宁县| 朝阳区| 韶山市| 凤台县| 秭归县|