Experiments with deque to see if it's more allocation friendly

This commit is contained in:
DennisOSRM
2012-04-25 17:12:46 +02:00
parent 41eb07e35b
commit d4536ba242
4 changed files with 14 additions and 11 deletions
+4
View File
@@ -64,6 +64,10 @@ NodeID readBinaryOSRMGraphFromStream(std::istream &in, std::vector<EdgeT>& edgeL
trafficLightNodes.push_back(i);
}
//tighten vector sizes
std::vector<NodeID>(bollardNodes).swap(bollardNodes);
std::vector<NodeID>(trafficLightNodes).swap(trafficLightNodes);
in.read((char*)&m, sizeof(unsigned));
DEBUG(" and " << m << " edges ");
for(unsigned i = 0; i < inputRestrictions.size(); ++i) {