As technology improves, the speed and complexity of chips increases. With microprocessors, both increased complexity and speed improvements lead to greater performance. But with memory chips, the result is a lower speed improvement and increased storage. This means that memory gets progressively slower compared to microprocessors. The most common solution is to have 1 or more caches - which store the most recently access memory locations. This is fine if you only process small amounts of data, but if you are processing large images, sound effects or 3D models, then caches aren't so helpful. In fact, there can be a speed reduction, because unused data is being read in or out. Small variables that are accessed often will be in the cache, so you don't need to worry about them. The first problem I will deal with is when you want to read and process a large array - an image, for example. Because the image won't be in the cache (unless it is small and has recently been processed) the read instructions will be slow. If the processor has to stop and wait for the values to be read in before continuing then performance will be bad. |
|||||||||||