I remember assuming that an L1 cache hit is 1 cycle (i.e. identical to register access time) in my architecture class, but is that actually true on modern x86 processors?
How many cycles does an L1 cache hit take? How does it compare to register access?
Here’s a great article on the subject:
http://arstechnica.com/gadgets/reviews/2002/07/caching.ars/1
To answer your question – yes, a cache hit has approximately the same cost as a register access. And of course a cache miss is quite costly 😉
PS:
The specifics will vary, but this link has some good ballpark figures:
Approximate cost to access various caches and main memory?
PPS:
These figures represent much older, slower CPUs, but the ratios basically hold:
http://arstechnica.com/gadgets/reviews/2002/07/caching.ars/2