Closed
Bug 1425770
Opened 8 years ago
Closed 6 years ago
Compare performance of Rust's vector and hash tables against Gecko's
Categories
(Core :: General, enhancement)
Core
General
Tracking
()
RESOLVED
WORKSFORME
| Tracking | Status | |
|---|---|---|
| firefox59 | --- | affected |
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
(Blocks 1 open bug)
Details
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/
Comment 3•7 years ago
|
||
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
Comment 4•7 years ago
|
||
And for good measure, some patches to make it std::collections::HashMap: https://github.com/rust-lang/rust/pull/56241
| Assignee | ||
Comment 5•6 years ago
|
||
Bug 1477622 was the most important part of this, I think this bug can now be closed.
| Assignee | ||
Updated•6 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•