开发者

C++ STL vs. Boost.Intrusive allocation performance

开发者 https://www.devze.com 2023-02-25 13:06 出处:网络
I often heard that the boost library containers are more performant than the STL ones, because they don\'t allocate the objects internally. But isn\'t it as fast or even faster if we use a memory pool

I often heard that the boost library containers are more performant than the STL ones, because they don't allocate the objects internally. But isn't it as fast or even faster if we use a memory pool for the allocator template parameter of STL's templated containers? This one could cache memory chuncks of same size. So, we can reuse these chuncks which should be really fast.

I'm looking for a high开发者_JAVA技巧 performance random access and sequential container. In addition, I need thread safe versions of them.

EDIT: I want to create a list which stores elements in last-recently used order.

0

精彩评论

暂无评论...
验证码 换一张
取 消