Profiling Your Rust Application

One of the elementary steps to understand why your application is going slower than expected is to check what your application is doing at a low level. In this chapter, you will understand the importance of low-level optimization, and learn about some tools that will help you find where your bottlenecks are.

In this chapter, you will learn about the following topics:

  • How the processor works at low level
  • CPU caches
  • Branch prediction
  • How to fix some of the most common bottlenecks
  • How to use Callgrind to find your most-used code
  • How to use Cachegrind to see where your code might be performing poorly in the cache
  • Learn how to use OProfile to know where your program spends most of its execution time

Get Rust High Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.