Skip to content

Commit

Permalink
perf: use BTreeMap for ResourceTable (denoland#10074)
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronO committed Apr 9, 2021
1 parent 01d8d70 commit 0fd1fb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/resources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::any::type_name;
use std::any::Any;
use std::any::TypeId;
use std::borrow::Cow;
use std::collections::HashMap;
use std::collections::BTreeMap;
use std::iter::Iterator;
use std::rc::Rc;

Expand Down Expand Up @@ -67,7 +67,7 @@ pub type ResourceId = u32;
/// the key in the map.
#[derive(Default)]
pub struct ResourceTable {
index: HashMap<ResourceId, Rc<dyn Resource>>,
index: BTreeMap<ResourceId, Rc<dyn Resource>>,
next_rid: ResourceId,
}

Expand Down

0 comments on commit 0fd1fb9

Please sign in to comment.