You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a CostStack, the user must keep in mind the index of each Cost component they have defined, in order to be able to modify the Cost object later on. It would be more intuitive to use std::map<String,CostPtr> to retrieve each component, instead of using std::vector<CostPtr>.
The text was updated successfully, but these errors were encountered:
We can be use boost::unordered_map for now. It is quite fast, faster than std::unordered_map in recent versions of Boost (> 1.80), and we depend on boost already.
The benchmark in the above link also suggests well-balanced performance across the board. There is also the choice of allocator and hash function, but I don't think it's that important at this point.
One important aspect for MPC is having stable references (explained in the benchmark). We can't afford an insertion into the map moving other elements around because we want to be able to keep our own "book" of the components for e.g. on-the-fly modification.
When creating a CostStack, the user must keep in mind the index of each Cost component they have defined, in order to be able to modify the Cost object later on. It would be more intuitive to use
std::map<String,CostPtr>
to retrieve each component, instead of usingstd::vector<CostPtr>
.The text was updated successfully, but these errors were encountered: