Skip to content
This repository was archived by the owner on Feb 1, 2022. It is now read-only.

Substitute std::map with boost::container::flat_map #3

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Matching/src/orderbook.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "tbb/parallel_reduce.h"
#include "tbb/blocked_range.h"
#include <boost/container/map.hpp>
#include <boost/container/flat_map.hpp>
#include <boost/container/deque.hpp>
#include <boost/container/adaptive_pool.hpp>
#include <boost/container/allocator.hpp>
Expand Down Expand Up @@ -127,8 +128,7 @@ class OrderBook
}
compare_type type;
};
using map_allocator = boost::container::adaptive_pool<std::pair<const Price, OrderQueue>>;
using order_tree_type = boost::container::map<Price, OrderQueue, Comp, map_allocator>;
using order_tree_type = boost::container::flat_map<Price, OrderQueue, Comp>;
order_tree_type buy_tree_;
order_tree_type sell_tree_;
public:
Expand Down