Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Profiling Code in Rust - Techniques for Time and Memory Optimization

Rust via YouTube

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

Reviews

Start your review of Profiling Code in Rust - Techniques for Time and Memory Optimization

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.