When I pass reserve() a value high enough that may mean the need for reallocation, is the vector reallocated immediately or only at next push_back()?
When I pass reserve() a value high enough that may mean the need for reallocation, is the vector reallocated immediately or only at next push_back()?
Last edited by Mario F.; 06-12-2006 at 10:28 AM.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
Memory should be reallocated immediately.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
Thanks laserlight.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.