Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b4092e8

Browse files
committedMar 31, 2019
Test ahash
1 parent a89c03a commit b4092e8

File tree

3 files changed

+133
-28
lines changed

3 files changed

+133
-28
lines changed
 

‎Cargo.lock

Lines changed: 122 additions & 26 deletions
Original file line numberDiff line numberDiff line change

‎src/librustc_data_structures/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ cfg-if = "0.1.2"
2121
stable_deref_trait = "1.0.0"
2222
rayon = { version = "0.1.2", package = "rustc-rayon" }
2323
rayon-core = { version = "0.1.2", package = "rustc-rayon-core" }
24-
rustc-hash = "1.0.1"
24+
ahash = { git = "https://github.com/tkaitchuck/aHash.git" }
2525
smallvec = { version = "0.6.7", features = ["union", "may_dangle"] }
2626

2727
[dependencies.parking_lot]

‎src/librustc_data_structures/fx.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
pub use rustc_hash::{FxHasher, FxHashMap, FxHashSet};
1+
use std::hash::BuildHasherDefault;
2+
use std::collections::hash_map::HashMap;
3+
use std::collections::hash_set::HashSet;
4+
pub use ahash::AHasher as FxHasher;
5+
6+
/// Type alias for a hashmap using the `fx` hash algorithm.
7+
pub type FxHashMap<K, V> = HashMap<K, V, BuildHasherDefault<FxHasher>>;
8+
9+
/// Type alias for a hashmap using the `fx` hash algorithm.
10+
pub type FxHashSet<V> = HashSet<V, BuildHasherDefault<FxHasher>>;

0 commit comments

Comments
 (0)
Please sign in to comment.