3 ms·
It extremely depends on the target CPU. Some CPUs do have instructions that operate on RAM directly, no register required. However, the tradeoff is that RAM is
by mystified5016 2y ago
It extremely depends on the target CPU. Some CPUs do have instructions that operate on RAM directly, no register required.
However, the tradeoff is that RAM is almost always 2-4 times slower than writing to registers. Most of the time it's more efficient to copy from RAM to a register and back.
Most CPUs are designed to operate on registers, but it's not too uncommon to see simple things like incrementing a variable in RAM without an intermediate copy. There might be more, I don't know a lot about x86