by ric129 · 10y ago · 0 comments
If I had to guess, it's because the std::vector is more conservative in memory use and it causes more malloc/array copy calls.
The elements are created directly adjacent to each other. This makes iteration faster because RAM locality despite the pointer-based data structure.