0:00 / 0:00
Profiling Code in Rust - by Vitaly Bragilevsky - Rust Linz, December 2022
Rust Programming Language
70K subscribers • 42 videos on Hallway • Conference channel
- One of the most-watched uploads on Rust, a conference or university channel Hallway lists. Nobody has recommended it in the communities yet, so it ranks below community picks.
- Presented by Vitaly Bragilevsky
Intermediate. Assumes working knowledge.
26K views3 years ago
Programming languagesSystems programmingRustPerformance and optimizationDebugging
Vitaly Bragilevsky explains how to profile Rust programs to analyze and optimize runtime performance and memory usage.
Profiling is a way to understand program behavior in terms of time and memory usage at runtime. Profiling is generally considered an advanced topic, but it doesn't have to be hard at all! In this talk, I want to present and discuss various approaches, tools, and crates that help us to explore time and memory usage of our programs. We’ll explore a simple project, discover its characteristics and see what can be done to optimize them. We’ll see how to measure the timings of code fragments and functions reliably. We'll look at flame graphs and learn how to understand them. We’ll talk about such techniques as reserving memory in advance, avoiding creating auxiliary data structures, and removing unnecessary memory operations. We’ll also see that extensive correctness testing is a must-do when optimizing code because making programs faster and more memory-efficient should not lead to making them incorrect. It's okay to profile our code along with writing it. It's not about unneeded premature optimization, it's about doing it right at the first run! Slides: bit.ly/profiling-rust Rust Linz: sessionize.com/rust-linz rust-linz.at fosstodon.org/@rustlinz twitter.com/rustlinzWhy it's here
A top upload from a listed channelRust is on Hallway's list of conference and university channels, and this upload is one of its most-watched talks or lectures. Nobody has recommended it in the communities yet, so it ranks below community picks.