`std::vector` is often said to be the default container, because it provides good baseline performance for common operations. Recently, I experimented with a simple API change that can improve the performance of a common usage pattern by 10+ %.
That’s totally right but I thought you were talking about signed numbers since you said “integer overflow”. I forgot that len is usually unsigned in C++.
Only signed overflow. size_t is unsigned.
That’s totally right but I thought you were talking about signed numbers since you said “integer overflow”. I forgot that
len
is usually unsigned in C++.