STL or Qt containers?

后端 未结 14 1802
再見小時候
再見小時候 2020-12-02 04:10

What are the pros and cons of using Qt containers (QMap, QVector, etc.) over their STL equivalent?

I can see one reason to prefer Qt:

14条回答
  •  抹茶落季
    2020-12-02 05:09

    My five cents: Qt containers are supposed to work similar on different platforms. While STL containers depend on STL implementation. You might get different performance results.

    EDIT: I am not telling that STL is "slower" but I point to effects of various implementation details.
    Please check this, and then maybe this.
    And it is not a real problem of STL. Obviosly, if you have significant difference in performance, then there is problem in the code which uses STL.

提交回复
热议问题