Live data from Hacker News

Why Registers Are Fast and RAM Is Slow

mikeash.com

91–92 of 92 posts

Re: Why Registers Are Fast and RAM Is Slow

#91
post #8

For a way more detailed look at memory architectures and implementation, check out Ulrich Drepper's classic paper "What Every Programmer Should Know About Memory"[1] [1] http://www.akkadia.org/drepper/cpumemory.pdf

If you want to buy good book on the topic: "Memory Systems: Cache, DRAM, Disk" by Bruce Jacob, Spencer Ng, David Wang

A few days late, but thanks

Re: Why Registers Are Fast and RAM Is Slow

#92
post #87
post #83

Earlier quoted context omitted.

Where would your processor fetch its program code from, if not RAM? Assuming you place code also into registers... If you squint hard enough registers are also a form of RAM, just closer to the processor and faster. A machine with only instruction execute and registers would still have a Harvard/Von Neumann architecture. The reason why processors don't have more registers is because they are quite power hungry and th…

Right, registers are a kind of very small working memory, the only place where "work" operations can happen. Most program code eventually has to go through the register bank anyway, except it all has to be MOV in and out of the registers, eating up unbelievable amount of time. I've always viewed RAM as a kind of register cache, necessitated because registers are expensive to build and RAM, though expensive, is cheape…

I think you don't understand how physics work.

The problem with modern chips is not money, or the price of energy. The poor things would simply fry (or explode) if we were to make them like you suggest and clock them at competitive frequency.

Post reply on HN