Are CPU registers and CPU cache different?
-
Related: http://stackoverflow.com/questions/14504734/cache-or-registers-which-is-faster – Ciro Santilli OurBigBook.com Feb 12 '17 at 15:44
3 Answers
Yes, CPU register is just a small amount of data storage, that facilitates some CPU operations.
CPU cache, it is a high speed volatile memory which is bigger in size, that helps the processor to reduce the memory operations.
- 20,548
- 30
- 97
- 138
It is not very inaccurate to think of the processor's register as the level 0 cache, smaller and faster than the other layers of cache in-between the processor and memory. The difference is only that from the point of view of the instruction set, cache access is transparent (the cache is accessed through a memory address that happens to be a cached address at the moment) whereas registers are explicitly referenced in each instruction.
- 79,187
- 7
- 161
- 281
-
Could you please be more specific? I'd like to know if registers are implemented the same way as cache (SRAM). I understand a SRAM cell is made of 6 or so transistors. Are registers the same or is it some other kind of circuit? – Tomáš Růžička Aug 06 '21 at 10:56
-
@TomášRůžička In a modern processor with Out-Of-Order execution using a variant of the Tomasulo algorithm, a register accounts for way more than 6 transistor if you consider the “renaming” circuitry. But then again the important part in a CPU cache is not the 6 transistors that hold a bit of information, but the circuitry that remembers which bit is remembered by the 6 transistors. Long story short, your question is significantly different from the original question, and please note that the original question was closed as off-topic. – Pascal Cuoq Aug 08 '21 at 22:26
registers are special temporary storage locations within the CPU that very quickly accept,store and transfer data and instructions that Are immediately used.cache memory is a very fast used by the CPU of computer that is used to frequently request data and instructions
- 31
- 1