I mean this:
void MyNoobMegaFunction(std::vector<MegaObject> objects)
[...]
STL is not slow, sure. But STL allows to programmer to make it VERY slow.
Sure, copying large objects is a slow operation. Sure, copying many large objects is a much slower operation. This isn't due to STL, though. It would be just as slow if you were making a copy of an array instead of a vector, although passing an array to a function technically just passes the pointer.
The solution, of course, is to pass by reference (preferably) or pointer :)
void MyNoLongerNoobMegaFunction(std::vector<MegaObject>& objects);
Sure, copying large objects is a slow operation. Sure, copying many large objects is a much slower operation. This isn't due to STL, though. It would be just as slow if you were making a copy of an array instead of a vector, although passing an array to a function technically just passes the pointer.
The solution, of course, is to pass by reference (preferably) or pointer :)
void MyNoLongerNoobMegaFunction(std::vector<MegaObject>& objects);
Believe me, I know it. But we still didn't see any source codes of topic starter. So, I was just guessing. Because it's the common mistake of newbies.