Skip to content
0:00 / 0:00

#rust#optimization#cloning

RustConf 2021 - The Importance of Not Over-Optimizing in Rust by Lily Mara

Rust Programming Language

70K subscribers • 72 videos on Hallway • Conference channel

YouTube
  • Recommended by 2 people: 1 on Lobsters and 1 in engineering communities.
  • Presented by Lily Mara
  • An opinion. It argues one side of a question engineers disagree on.

Beginner. No background in the topic needed.

10K views5 years ago2 recommendations

Programming languagesTools and practiceRustPerformance and optimizationSimplicity and complexity

Lily Mara argues that early optimizations in Rust are often unnecessary and explains how simpler code can still outperform dynamic languages.

The Importance of Not Over-Optimizing in Rust by Lily Mara The Rust programming language has a lot of advanced features that enable some fantastic optimizations. For new Rust developers these can feel both exciting and constricting. Because Rust allows us to write highly-optimized code that we as experienced Rust developers can understand, it's tempting to do this all the time. In this talk I will show that these optimizations are often unnecessary to get performance that beats highly dynamic languages like Python. For new Rust developers, breaking the temptation to over-optimize can lead to higher productivity and satisfaction with Rust.

Why it's here

2 people recommend this

What people say. Recommended as a reassuring talk for beginners, emphasizing that cloning and simple patterns are perfectly fine in Rust.

u/alsurenin r/rust • Recommends

On “Just had a major Rust appreciation moment”

Cloning and `Arc<Mutex<>>`ing is *fine*. Especially in async application code, where the networking overheads often dominate. link to this video is my favourite recent video on this topic (especially the hints for new developers section at the end). That said, I would be curious to see an example of code that you are unhappy with, because *sometimes* these nagging feelings are a hint that there is a simplifying refactor to your data model that's lurking just around the corner, and it's so satisfying when you find them.

MatheusRichon Lobsters • Recommends

The Importance of Not Over-Optimizing