penberg / helix

Helix, a market data feed handler for C and C++.
Other
110 stars 35 forks source link

try boost::multi_index::multi_index_container #21

Closed ghost closed 9 years ago

ghost commented 9 years ago
typedef multi_index_container<
order,
indexed_by<
hashed_unique<
member<order, uint64_t, &order::id>>>
> orders_type;

see https://github.com/divaykin/quick-n-dirty-bench/blob/master/hashmap.cpp#L98

it could be seriously faster for our case.

also you can replace your map<> with ordered containers. or even try to place bids and asks into the same container just multiple indices