Question

Part of Dcache (L1) can be used as local memory on the cavium octeon architecture (base on the mips64). I want to know which is faster;reading a value from this memory (Dcache) or from normal global variable (.data)?

Was it helpful?

Solution

The reason why CPU manufactures complicate the design and cost by adding different caches to CPU is to decrease memory reading latency. It is much faster to access data from L1 cache than from RAM. So the answer is that reading value from L1 data cache is much faster (I do not have exact figures and it depends on the type and latency properties of the memory and speed of the CPU, but roughly we are talking of differences in the range of maybe less than 10 clock cycles for L1 versus over 100 clock cycles for accessing data from DRAM (cache miss) - very rough numbers indeed).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top