¡@

Home 

c++ Programming Glossary: arr_size

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

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

ctime #include sys time.h #include cassert #define ARR_SIZE 1000000 using std string void printtime struct timeval start.. start struct timeval end string str int main void int arr ARR_SIZE int tmp struct timeval start stop srand time NULL Writing data.. data to array gettimeofday start NULL for int i 0 i ARR_SIZE i arr i rand gettimeofday stop NULL printtime start stop string..