iterator vs reverse_iterator

前端 未结 6 1631
暗喜
暗喜 2021-01-05 05:52

I\'m using std::map to store a lot of elements (pairs of elements) and I have a \"little\" doubt. What is more efficient to iterate all elements over my

6条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-05 06:21

    Unless you have profiled your code and found there to be a significant difference, I just wouldn't be concerned about it.

    "Premature optimization is the root of all evil." - Donald Knuth

提交回复
热议问题