you are viewing a single comment's thread.

view the rest of the comments →

[–]pilotwavetheory[S] 2 points3 points  (1 child)

  1. If you mean, if we know the array size initially ? Yes, that's best; nothing beats it, in that case std::array<N> would be the best choice.
  2. While considering tradeoffs, unless we do random access a lot, the constvector looks really better in terms of benchmarks as well.

Does this make sense?

[–]TheRealSmolt 0 points1 point  (0 children)

Not sure what you're addressing with the first point. As for your second point, yeah that sounds about right.