We have learned how to profile our application and how to find and fix the main bottlenecks, but there is another step in this process: checking whether our changes have improved the performance.
In this chapter, you will learn how to benchmark your application so that you can measure your improvements. This can meet two objectives: firstly, to check whether a new version of your application runs faster than an older version, and secondly, if you are creating a new application to solve a problem an existing application already solves, to compare the efficiency of your creation to the existing application.
In this context, you will learn about the following topics in this chapter:
- Selecting what to benchmark
- Benchmarking in nightly Rust
- Benchmarking in stable Rust
- Continuous integration for benchmarks