Good C++ array class for dealing with large arrays of data in a fast and memory efficient way?

后端 未结 4 815
既然无缘
既然无缘 2020-12-06 03:16

Following on from a previous question relating to heap usage restrictions, I\'m looking for a good standard C++ class for dealing with big arrays of data in a way that is bo

4条回答
  •  孤城傲影
    2020-12-06 03:34

    Have you tried using an std::deque? Unlike a std::vector, which uses one huge heap allocation, deque usually allocates in small chunks, but still provides amortised constant time indexing via operator[].

提交回复
热议问题