Compare performance of Rust's vector and hash tables against Gecko's

ASSIGNED
Assigned to

Status

()

enhancement
ASSIGNED
a year ago
4 months ago

People

(Reporter: njn, Assigned: njn)

Tracking

(Blocks 1 bug)

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox59 affected)

Details

(Assignee)

Description

a year ago
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.)
(Assignee)

Updated

9 months ago
Depends on: 1477622

Comment 1

4 months ago
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 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.