Is std::vector so much slower than plain arrays?

后端 未结 22 2747
南方客
南方客 2020-11-22 12:00

I\'ve always thought it\'s the general wisdom that std::vector is \"implemented as an array,\" blah blah blah. Today I went down and tested it, and it seems to

22条回答
  •  忘掉有多难
    2020-11-22 12:15

    Try disabling checked iterators and building in release mode. You shouldn't see much of a performance difference.

提交回复
热议问题