6hn_ |
The Dark Side of .reserve()
https://www.youtube.com/watch?v=algDLvbl1YY
Saved on 2023-08-17 [19586 edays] via youtube.com
Modified 2023-08-17 [19586 edays]
programming rust
https://www.youtube.com/watch?v=algDLvbl1YY
Saved on 2023-08-17 [19586 edays] via youtube.com
Modified 2023-08-17 [19586 edays]
programming rust
.reserve(...)
is a method you might've seen in the API of your favorite dynamic array (or hash table or whatnot), and it's an excellent tool for making simple, impactful performance optimizations while you are building up data structures. But just like all tools, it has sharp edges. In this video we'll dive into where.reserve()
can make your performance sing--and where it can be devastating.