To understand the concept of memory streams , So you need to know a little bit about the hardware . We know that today's computer has two major components :CPU And memory .CPU It's the CPU , Mainly responsible for the implementation of 、 control 、 Computing and other tasks , It's kind of like the curator in the gallery ; And memory is like a book in a library , All knowledge is kept in the book . If you want to process knowledge , Need the administrator to find the corresponding book , After reading , You can get knowledge . Therefore, the management of the library will be classified management , And add a fixed label . It's equivalent to the entire library's memory , But there will be bookshelves for some commonly used books in the library , Put some commonly used 、 Books on loan , This can improve the efficiency of books , It's also convenient for people to find . There are also some books which are more remote , It's not easy to find on the bookshelf . In the same way, computers are managed in this way , Common data is stored in the memory of the memory , Not commonly used in hard disk or solid-state drive , perhaps U On the disk . therefore , Memory is formed in the computer. It's fast , Hard disk slow way . It's not just because memory hardware is expensive to make , It's also because after the memory gets bigger , Addressing power has also declined , Power consumption has gone up , So the memory can't be infinite . From here we should get a concept like this : Memory is several orders of magnitude faster than hard disk .
With the above concept , So as a software developer , Obviously, it is necessary to make