Skip to content
0:00 / 0:00

#rust#std::collections#hashmap

Crust of Rust: std::collections

Jon Gjengset

111K subscribers • 38 videos on Hallway

YouTube
  • Recommended by 3 people: 3 in engineering communities.
  • Presented by Jon Gjengset

Intermediate. Assumes working knowledge.

93K views3 years ago3 recommendations

Programming languagesComputer scienceRustData structuresAlgorithms

Jon Gjengset explains the various collection types in the Rust standard library, discussing how they work and their respective trade-offs.

In this video we go over the various collection types in the Rust standard library (effectively `std::collections`), and discuss a bit about how they work, when you might use each one, and what their respective trade-offs are. doc.rust-lang.org/std/collections/ Introduction Vec VecDeque LinkedList *Set types HashMap BTreeMap BinaryHeap Option and Result maybe(?) Is () a collection? Live version with chat: youtube.com/live/hmEtN8oS_uY

Why it's here

3 people recommend this

What people say. Recommended as a deep dive into Rust standard library collections and their performance characteristics.

Moments people linked to

u/Ammar_AAZin r/rust • Recommends

On “Intuition for `HashMap` vs `BTreeMap` performance”

I think it worth understanding what happen behind the seen on each option. For that I've got Collection documentation from the standard library and the Crust of Rust: Collection Video on YouTube for deeper understanding. I think there are a lot of points to consider, like how many items are there and how costly checking for Equality is compared to hashing. Normally I'll not consider any map for collection smaller than 30 items, then if the order doesn't matter then it should be really a good reason for using a BTreeMap over a HashMap. Finally if performance is important then we should always measure because our consumption aren't trustworthy enough because the amount of crazy optimizatio…

u/phazer99in r/rust • Recommends

On “What should I do to be employable as a Rust programmer?”

I would focus on learning the fundamentals (probably not a complete list): * common data structures and algorithms, start with the ones in the stdlib, learn big O notation and the complexity of each data structure/algorithm * concurrency: threads/tasks, locks, atomics, channels, async etc. * basic math knowledge: logic, set theory, calculus, number theory, linear algebra, geometry, statistics etc. * operating system concepts: kernels, drivers, processes, memory management, file systems etc. * networking: TCP, UDP, IP, DNS, sockets, HTTP, TLS/SSL * crypto: AES, RSA, hash algorithms, certificates * databases: SQL, key-value, document-oriented etc. * AI and machine learning * GPU programming…

u/simonsanonepatterns · rusticin r/rust • Recommends

On “Hash Trait Prefix Collision - What does it even mean?”

Crust of Rust: std::collections by Jon Gjengset link to this video Really recommend you to watch that.
4View on Reddit