C++ design: How to cache most recent used

前端 未结 10 1412
走了就别回头了
走了就别回头了 2021-02-09 12:21

We have a C++ application for which we try to improve performance. We identified that data retrieval takes a lot of time, and want to cache data. We can\'t store all data in mem

10条回答
  •  醉酒成梦
    2021-02-09 13:09

    Another option might be to use boost::multi_index. It is designed to separate index from data and by that allowing multiple indexes on the same data.

    I am not sure this really would be faster then to scan through 1000 items. It might use more memory then good. Or slow down search and/or insert/remove.

提交回复
热议问题