mirror of
https://github.com/servo/servo.git
synced 2025-09-27 23:30:08 +01:00
Removed FnvHash and transformed the rest to FxHashmap (#39233)
This should be the final PR for the Hash Function series that is trivial. Of note: I decided to transform `HashMapTracedValues<Atom,..>` to use FxBuildHasher. This is likely not going to improve performance as Atom's already have a unique u32 that is used as the Hash but it safes a few bytes for the RandomState that is normally in the HashMap. Signed-off-by: Narfinger <Narfinger@users.noreply.github.com> Testing: Hash function changes should not change functionality, we slightly decrease the size and unit tests still work. Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
This commit is contained in:
parent
726b456120
commit
84465e7768
55 changed files with 211 additions and 202 deletions
|
@ -7,8 +7,8 @@ use std::default::Default;
|
|||
use base::id::BrowsingContextId;
|
||||
use constellation_traits::{IFrameSizeMsg, ScriptToConstellationMessage, WindowSizeType};
|
||||
use embedder_traits::ViewportDetails;
|
||||
use fnv::FnvHashMap;
|
||||
use layout_api::IFrameSizes;
|
||||
use rustc_hash::FxHashMap;
|
||||
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
|
@ -56,7 +56,7 @@ impl IFrameCollection {
|
|||
|
||||
// Preserve any old sizes, but only for `<iframe>`s that already have a
|
||||
// BrowsingContextId and a set size.
|
||||
let mut old_sizes: FnvHashMap<_, _> = self
|
||||
let mut old_sizes: FxHashMap<_, _> = self
|
||||
.iframes
|
||||
.iter()
|
||||
.filter_map(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue