c++ Programming Glossary: elements_in_vector
::std::vector::at() vs operator[] << surprising results!! 5 to 10 times slower/faster! http://stackoverflow.com/questions/3269809/stdvectorat-vs-operator-surprising-results-5-to-10-times-slower-f windows.h #include conio.h #include vector #define ELEMENTS_IN_VECTOR 1000000 int main __int64 freq start end diff_Result if QueryPerformanceFrequency.. freq 1000000 microseconds std vector int vec vec.reserve ELEMENTS_IN_VECTOR for int i 0 i ELEMENTS_IN_VECTOR i vec.push_back i int xyz 0.. int vec vec.reserve ELEMENTS_IN_VECTOR for int i 0 i ELEMENTS_IN_VECTOR i vec.push_back i int xyz 0 printf Press any key to start _getch..
|