STL Alternative

前端 未结 15 1819
故里飘歌
故里飘歌 2021-01-31 04:24

I really hate using STL containers because they make the debug version of my code run really slowly. What do other people use instead of STL that has reasonable performance for

15条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-31 04:38

    STL containers should not run "really slowly" in debug or anywhere else. Perhaps you're misusing them. You're not running against something like ElectricFence or Valgrind in debug are you? They slow anything down that does lots of allocations.

    All the containers can use custom allocators, which some people use to improve performance - but I've never needed to use them myself.

提交回复
热议问题