Skip to content

Commit

Permalink
Use boost::container::deque instead of std::deque
Browse files Browse the repository at this point in the history
This improves sorting performance by 31%.
  • Loading branch information
Ortham committed Jan 17, 2025
1 parent ca9c6da commit 5af5b8c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/api/sorting/plugin_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "plugin_graph.h"

#include <boost/algorithm/string.hpp>
#include <boost/container/deque.hpp>
#include <boost/graph/breadth_first_search.hpp>
#include <boost/graph/iteration_macros.hpp>
#include <boost/graph/topological_sort.hpp>
Expand Down Expand Up @@ -474,8 +475,8 @@ bool FindPath(RawPluginGraph& graph,
const vertex_t& fromVertex,
const vertex_t& toVertex,
BidirVisitor& visitor) {
std::queue<vertex_t> forwardQueue;
std::queue<vertex_t> reverseQueue;
std::queue<vertex_t, boost::container::deque<vertex_t>> forwardQueue;
std::queue<vertex_t, boost::container::deque<vertex_t>> reverseQueue;
boost::unordered_flat_set<vertex_t> forwardVisited;
boost::unordered_flat_set<vertex_t> reverseVisited;

Expand Down

0 comments on commit 5af5b8c

Please sign in to comment.