Switch from Microsofts STL to STLport

前端 未结 8 1285
不知归路
不知归路 2021-02-13 04:34

I\'m using quite much STL in performance critical C++ code under windows. One possible \"cheap\" way to get some extra performance would be to change to a faster STL library.

8条回答
  •  遇见更好的自我
    2021-02-13 04:44

    I haven't compared the performance of STLPort to MSCVC but I'd be surprised if there were a significant difference. (In release mode of course - debug builds are likely to be quite different.) Unfortunately the link you provided - and any other comparison I've seen - is too light on details to be useful.

    Before even considering changing standard library providers I recommend you heavily profile your code to determine where the bottlenecks are. This is standard advice; always profile before attempting any performance improvements!

    Even if profiling does reveal performance issues in standard library containers or algorithms I'd suggest you first analyse how you're using them. Algorithmic improvements and appropriate container selection, especially considering Big-O costs, are far more likely to bring greater returns in performance.

提交回复
热议问题