



















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




















































Processors Memory
Recap: Demo
O ( nlog 2 n ) O ( n )
O ( nlog 2 n ) O ( n )
Recap: Demo (2) for(i = 0 ; i < ARRAY_SIZE; i++) { for(j = 0 ; j < ARRAY_SIZE; j++) { c[i][j] = a[i][j]+b[i][j]; } } for(j = 0 ; j < ARRAY_SIZE; j++) { for(i = 0 ; i < ARRAY_SIZE; i++) { c[i][j] = a[i][j]+b[i][j]; } } O ( n 2 ) O ( n 2 Complexity )
Let’s start with “end-to-end latency” as the default metric — how long it takes to execute a program?
Execution time of a program in the von Neumann model
f30f1efa 4883ec 488d3d 0f0000e dcffffff 31c c408c30f
08400000 00000100 02004865 6c6c6f2c 20776f 6c 00000000 00000000
int main(){ printf(“Hello, world!\n”); } f30f1efa 4883ec 488d3d 0f0000e dcffffff 31c c408c30f
08400000 00000100 02004865 6c6c6f2c 20776f 6c 00000000 00000000
Instruction Fetch Arithmetic Logical Units (ALU) Complex Arithmetic Operations (Mul/div) Branch/ Jump Memory Operations Instruction Decode Program Counter Registers 4883ec sub $0x8,%rsp 0x8 0x 0x 0x How long do we need for each instruction on average? How many instruction “instances” for the program?