In Q1 2018 I plan to evaluate the performance (speed and memory usage) of Rust's basic data structures against Gecko's. - Rust structures: Vec, HashSet and HashMap. - Gecko structures: nsTArray, Vector, PLDHashTable and/or nsTHashtable. The motivation is that we want to make sure that the Rust structures aren't worse. (The choice of hash function for the Rust hash tables is likely to be important -- because the default hash function is high quality but slow -- and may result in specific guidelines in the Mozilla Coding Style doc.)
FYI, there are a set of drop-in stdlib replacement HashMap and HashSet implementations available which purport to be significantly faster and consume less memory. https://github.com/Amanieu/hashbrown
And some discussion regarding ^ https://www.reddit.com/r/rust/comments/9sn4ze/github_amanieuhashbrown_a_faster_hashmap_for_rust/
Yeah, I have a Firefox build using hashbrown in https://github.com/servo/webrender/issues/3363.
See Also: → https://github.com/servo/webrender/issues/3363
And for good measure, some patches to make it std::collections::HashMap: https://github.com/rust-lang/rust/pull/56241
You need to log in before you can comment on or make changes to this bug.