Switch from Microsofts STL to STLport

前端 未结 8 1268
不知归路
不知归路 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:43

    I've done the exact opposite a year ago and here is why:

    • StlPort is updated very rarely (as far as I know only one developer is working on it, you can take a look at their commit history)
    • Problems building it whenever you switch to new Visual Studio release. You wait for the new make file or you create it yourself but sometimes you can't build it because of some configuration option that you're using. Then you wait for them to make it build.
    • When you submit a bug report you wait forever, so basically no support (maybe if you pay). You usually end up fixing it yourself, if you know how.
    • STL in Visual Studio has checked iterators and debug iterator support that is much better than the one in StlPort. This is where most of the slowdown comes from especially in debug. Checked iterators are enabled in both debug and release and this is not something everybody knows (you have to disable them yourself).
    • STL in Visual Studio 2008 SP1 comes with TR1 and you don't have this in StlPort
    • STL in Visual Studio 2010 uses rvalue references from C++0x and this is where you get a real performance benefit.

提交回复
热议问题