What is cache in C++ programming?
Firstly I would like to tell that I come from a non-Computer Science
background & I have been learning the C++ language. I am unable to
understand what exactly is a cache? It has different meaning in different
contexts. I would like to know what would be called as a cache in a C++
program? For example, if I have some int data in a file. If I read it &
store in an int array, then would this mean that I have 'cached' the data?
To me this seems like common sense to use the data since reading from a
file is always bad than reading from RAM. But I am a little confused due
to this article. It says that reading data from cache is much faster than
from RAM. I thought RAM & cache were the same. Can somebody please clear
my confusion?
No comments:
Post a Comment