Why Registers Are Fast and RAM Is Slow
mikeash.com
Why Registers Are Fast and RAM Is Slow
1–10 of 92 posts
Re: Why Registers Are Fast and RAM Is Slow
#2Not worth reading.
Re: Why Registers Are Fast and RAM Is Slow
#3Edit: Chill, everyone. Yes, it's "implementation detail of the substrate", but it is a very important implementation detail given that it is directly exposed to the programmer as memory, not in some automagically managed cache.
Re: Why Registers Are Fast and RAM Is Slow
#4Theres something in between, which you will find on microcontrollers: SRAM. If you use simple architectures, like AVR, you also get completely deterministic timings for a load from SRAM (e.g. 2 cycles for AVR). Edit: Chill, everyone. Yes, it's "implementation detail of the substrate", but it is a very important implementation detail given that it is directly exposed to the programmer as memory, not in some automagica…
Re: Why Registers Are Fast and RAM Is Slow
#5Theres something in between, which you will find on microcontrollers: SRAM. If you use simple architectures, like AVR, you also get completely deterministic timings for a load from SRAM (e.g. 2 cycles for AVR). Edit: Chill, everyone. Yes, it's "implementation detail of the substrate", but it is a very important implementation detail given that it is directly exposed to the programmer as memory, not in some automagica…
Re: Why Registers Are Fast and RAM Is Slow
#6Cites distance and cost/power as reasons why "RAM is slow, registers are fast", not a mention of differences between SRAM and (S)DRAM. Not worth reading.
Re: Why Registers Are Fast and RAM Is Slow
#7Theres something in between, which you will find on microcontrollers: SRAM. If you use simple architectures, like AVR, you also get completely deterministic timings for a load from SRAM (e.g. 2 cycles for AVR). Edit: Chill, everyone. Yes, it's "implementation detail of the substrate", but it is a very important implementation detail given that it is directly exposed to the programmer as memory, not in some automagica…
SRAM is used in every CPU, not just microcontrollers. Registers and cache are usually implemented as SRAM. The false distinction this article makes between registers and RAM is misleading and indicative of the author's general ignorance of computer architecture.
Re: Why Registers Are Fast and RAM Is Slow
#8Re: Why Registers Are Fast and RAM Is Slow
#9Re: Why Registers Are Fast and RAM Is Slow
#10Cites distance and cost/power as reasons why "RAM is slow, registers are fast", not a mention of differences between SRAM and (S)DRAM. Not worth reading.
Agreed. Completely misses on-die caches for instance. Article might have been accurate in the 6502 days, but not today.
Absolutely, except for the part where he mentions them
> If you're really lucky and the value is in L1 cache, it'll only take a few cycles.