Overview
Explore code profiling techniques in Rust through this 48-minute conference talk by Vitaly Bragilevsky at Rust Linz, December 2022. Learn about various approaches, tools, and crates for analyzing program behavior in terms of time and memory usage at runtime. Discover how to measure function timings, interpret flame graphs, and implement optimization techniques such as reserving memory in advance, avoiding auxiliary data structures, and eliminating unnecessary memory operations. Gain insights into profiling memory usage, using instruments, working with Docker, and profiling in Linux environments. Understand the importance of extensive correctness testing when optimizing code and learn how to profile alongside development for better efficiency without compromising program integrity.
Syllabus
Introduction
Definition
Why we dont profile
Project structure
Run configuration
Profiling memory usage
Length and capacity
Profiling with Instruments
Dockerfile
Profiling in Linux
Time Profiling
Benchmarking
Flame Graph
Fixing Capacity
Mutability Reader
Avoid temporary structures
Optimized version
Benchmarks
Taught by
Rust