¡@

Home 

c++ Programming Glossary: printtime

C++ Array vs Vector performance test explanation [closed]

http://stackoverflow.com/questions/10887668/c-array-vs-vector-performance-test-explanation

cassert #define ARR_SIZE 1000000 using std string void printtime struct timeval start struct timeval end string str int main.. for int i 0 i ARR_SIZE i arr i rand gettimeofday stop NULL printtime start stop string Time taken to write to array. Reading data.. for int i 0 i ARR_SIZE i tmp arr i gettimeofday stop NULL printtime start stop string Time taken to read from array sequentially...