mirror of
https://github.com/denoland/deno.git
synced 2025-01-21 21:50:00 -05:00
perf: use BTreeMap for ResourceTable (#10074)
This commit is contained in:
parent
01d8d70b10
commit
0fd1fb9329
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
@ -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,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue