Comment Comment by dragontamer Create 1-billion 32-bit integers numbers between 0 to 1-billion. Knuth shuffle the integers."Linked list" traverse the integers as follows: //array is full of 1-billion numbers, randomly sorted uint32_t idx = 0; for(int i=0; i<200000000; i++){ idx = array[idx]; // Random traversal } Pull out a stopwatch (or use Linux's "time" functionality). Divide the time by 200000000. You've now measured memory latency. parent dragontamer 7 years ago
"Linked list" traverse the integers as follows:
Pull out a stopwatch (or use Linux's "time" functionality). Divide the time by 200000000. You've now measured memory latency.