57

Are CPU registers and CPU cache different?

Qian
  • 1,462
  • 1
  • 14
  • 25

3 Answers3

55

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.

Chathuranga Chandrasekara
  • 20,548
  • 30
  • 97
  • 138
42

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.

Pascal Cuoq
  • 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
3

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

Jacob
  • 31
  • 1