Use ArrayStorage for boundary nodes to optimize MLD

For the MLD algorithm we can partition the NodeID range into boundary
and non-boundary nodes. Since there are only we boundary nodes we can
use the ArrayStorage for those yielding much faster query times.
This commit is contained in:
Patrick Niklaus
2018-04-08 16:37:08 +00:00
committed by Patrick Niklaus
parent 7edf0f218c
commit bf2b45120a
12 changed files with 151 additions and 24 deletions
@@ -700,7 +700,8 @@ InternalManyRoutesResult alternativePathSearch(SearchEngineData<Algorithm> &sear
const Partition &partition = facade.GetMultiLevelPartition();
// Prepare heaps for usage below. The searches will modify them in-place.
search_engine_data.InitializeOrClearFirstThreadLocalStorage(facade.GetNumberOfNodes());
search_engine_data.InitializeOrClearFirstThreadLocalStorage(facade.GetNumberOfNodes(),
facade.GetMaxBorderNodeID() + 1);
Heap &forward_heap = *search_engine_data.forward_heap_1;
Heap &reverse_heap = *search_engine_data.reverse_heap_1;