29 ms·
Building a HashMap in Rust – Part 1: What's a HashMap?
- Gankro 12y ago"Oh I'll make this one shorter by breaking it into two parts" > 3100 words Fuck.
- kibwen 12y agoAlexis is doing pioneering work here in discovering how to idiomatically develop data structures in Rust. His work in the standard library has been absolutely critical, and his experimental collections library (https://github.com/Gankro/collect-rs https://github.com/Gankro/collect-rs) is definitely worth looking into. With regard to hashmaps specifically, it's my experience that users coming to Rust from dynamic languages reach for this data structure as a matter of habit. One of the challenges of Rust will be in educating new users as to the benefits of alternative data structures. I'd really love some sort of centralized documentation to this end.
- dbaupp 12y agoTo be fair: a lot of other people are doing this sort of work too, e.g. cgaebel implemented most of the current robin hood hash map and gereeter has been pushing the boundaries of optimisation+safety. There's also http://doc.rust-lang.org/nightly/std/collections/#when-should-you-use-which-collection http://doc.rust-lang.org/nightly/std/collections/#when-shoul...? (the ? is part of the URL)