STL Alternative

前端 未结 15 1811
故里飘歌
故里飘歌 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:45

    If your running visual studios you may want to consider the following:

    #define _SECURE_SCL 0
    #define _HAS_ITERATOR_DEBUGGING 0
    

    That's just for iterators, what type of STL operations are you preforming? You may want to look at optimizing your memory operations; ie, using resize() to insert several elements at once instead of using pop/push to insert elements one at a time.

提交回复
热议问题