diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2016-11-08 14:02:55 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2016-11-08 15:14:59 +1100 |
| commit | 00e48affde2d349e3b3bfbd3d0f6afb5d76282a7 (patch) | |
| tree | 5432c8fcca66a63397e0f16a907bf6db33384365 /src/librustc_metadata/decoder.rs | |
| parent | eca1cc957fff157575f485ebfd2aaafb33ee98cb (diff) | |
| download | rust-00e48affde2d349e3b3bfbd3d0f6afb5d76282a7.tar.gz rust-00e48affde2d349e3b3bfbd3d0f6afb5d76282a7.zip | |
Replace FnvHasher use with FxHasher.
This speeds up compilation by 3--6% across most of rustc-benchmarks.
Diffstat (limited to 'src/librustc_metadata/decoder.rs')
| -rw-r--r-- | src/librustc_metadata/decoder.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_metadata/decoder.rs b/src/librustc_metadata/decoder.rs index ccd497860de..630b0774424 100644 --- a/src/librustc_metadata/decoder.rs +++ b/src/librustc_metadata/decoder.rs @@ -17,7 +17,7 @@ use schema::*; use rustc::hir::map as hir_map; use rustc::hir::map::{DefKey, DefPathData}; -use rustc::util::nodemap::FnvHashMap; +use rustc::util::nodemap::FxHashMap; use rustc::hir; use rustc::hir::intravisit::IdRange; @@ -432,7 +432,7 @@ impl<'a, 'tcx> MetadataBlob { /// Go through each item in the metadata and create a map from that /// item's def-key to the item's DefIndex. - pub fn load_key_map(&self, index: LazySeq<Index>) -> FnvHashMap<DefKey, DefIndex> { + pub fn load_key_map(&self, index: LazySeq<Index>) -> FxHashMap<DefKey, DefIndex> { index.iter_enumerated(self.raw_bytes()) .map(|(index, item)| (item.decode(self).def_key.decode(self), index)) .collect() |
