CMPT 225 Lecture 11: Lecture 11
Document Summary
Program running time depends on algorithm fundamentals, hardware speed, quality of programming. Our standard model of hardware has cpu connected to i/o to disk, network, user. In theory arithmetic operations take time 1 and so does accessing data in ram. But in reality operations in cpu about 200 times faster than to access an int in ram. Modern dram moves data fast: about as fast as a cpu can process it. Latency is how long from request to delivery. Trans alaska pipeline takes 4 days to redirect oil. Modern dram takes as long as 200 in operations. An unpleasant fact: for many applications, execution time is dominated by memory latency. Thus we created cpu cache which is close to the cpu. The cpu requests a byte from memory, system first checks if that byte is in cache, if it is ~2 20 cycle latency. If no ~200 cycle latency to read from memory.