Not Using STL is good because...

A lot of programmers like short readable code, STL just doesn't fit.
In theory programmers like short readable code, but many don't adhere to the theory. Personally I think STL is very readable at an algorithm level. Of course it abstracts the execution details.

Another problem with std::vector is of course that every push to it will check capacity and potentially resize. Normally you know ahead of time how many items you will need, so for performance reasons it's better to just set capacity upfront and then fill it in. This pulls capacity checks and allocations out of the inner loop. Also reduces memory fragmentation.
My machine learning program pushes a lot of data into a vector and I ran across this issue. So now I estimate what I'll need and preallocate large chunks of memory at a time. I didn't do extensive profiling, but it seemed to help.
 
STL is one of the reasons why I use C++ over plain C. For a beginner, I'd recommend using it right away. With lambda's in C++11, STL is now 100x more usable.

Situations's like Humus' are rare enought that any beginner would not need to consider them.
 
Back
Top