Profiling large simulation sizes (1,000,000+) shows a decent amount of time spent in accessing plans:

Given plans have sequential ids, perhaps we could speed things up by using a better data structure than a HashMap?
|
pub fn get_next_plan(&mut self) -> Option<Plan<T>> { |
|
trace!("getting next plan"); |
|
loop { |
|
// Pop from queue until we find a plan with data or queue is empty |
|
match self.queue.pop() { |
|
Some(entry) => { |
|
// Skip plans that have been cancelled and thus have no data |
|
if let Some(data) = self.data_map.remove(&entry.plan_id) { |
|
return Some(Plan { |
|
time: entry.time, |
|
data, |
|
}); |
|
} |
|
} |
|
None => { |
|
return None; |
|
} |
|
} |
|
} |
|
} |
Profiling large simulation sizes (1,000,000+) shows a decent amount of time spent in accessing plans:

Given plans have sequential ids, perhaps we could speed things up by using a better data structure than a
HashMap?ixa/src/plan.rs
Lines 127 to 146 in d98a7f5