- Mastering High Performance with Kotlin
- Igor Kucherenko
- 140字
- 2021-06-25 20:55:24
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.
推薦閱讀
- Learning Apex Programming
- 深入淺出Electron:原理、工程與實踐
- 零基礎學Scratch少兒編程:小學課本中的Scratch創意編程
- Python自動化運維快速入門
- Rust編程從入門到實戰
- Linux操作系統基礎案例教程
- Learning FuelPHP for Effective PHP Development
- Corona SDK Mobile Game Development:Beginner's Guide(Second Edition)
- 計算機應用基礎實踐教程
- 好好學Java:從零基礎到項目實戰
- RealSenseTM互動開發實戰
- App Inventor創意趣味編程進階
- OpenStack Networking Essentials
- 運維前線:一線運維專家的運維方法、技巧與實踐
- Zabbix Performance Tuning