Using arrays or std::vectors in C++, what's the performance gap?

后端 未结 19 1360
忘了有多久
忘了有多久 2020-11-22 03:23

In our C++ course they suggest not to use C++ arrays on new projects anymore. As far as I know Stroustroup himself suggests not to use arrays. But are there significant perf

19条回答
  •  有刺的猬
    2020-11-22 04:07

    Go with STL. There's no performance penalty. The algorithms are very efficient and they do a good job of handling the kinds of details that most of us would not think about.

提交回复
热议问题