Buffer与Cache的区别

Buffer:
In computer science, a buffer is a region of memory used to temporarily hold data while it is being moved from one place to another. Typically, the data is stored in a buffer as it is retrieved from an  input device  (such as a keyboard) or just before it is sent to an  output device  (such as a printer). However, a buffer may be used when moving data between processes within  a computer
计算机科学中,buffer是指在数据从一个地方移动到另一个地方的过程中数据在内存中的临时存储区域.
一般来讲,档数据"从输入设备(如键盘)得到以后,或在发送到输出设备(如显示器)之前"  后会存入buffer.
当然在同一台计算机上,数据在线程间传输时也会使用buffer.

cache :
In computer science, a  cache  is a  collection of data  duplicating original values stored elsewhere or computed earlier, where the original data is expensive to fetch (in terms of longer access time) or to  compute , compared to the cost of reading the  cache . In other words, a  cache  is a temporary storage area where frequently accessed data can be stored for rapid access. Once the data is stored in the  cache , future use can be made by accessing the cached copy rather than re-fetching or recomputing the original data, so that the average access time is shorter.
在计算机科学中,cache是存储在别的地方的数据或先前计算过的数据的副本,这些数据的源数据的存取是非常昂贵的(跟cache相比读取需要消耗很长的时间).
换句话说,cache是对读取频率极高或需要高速读取的数据的临时存储的地方.
一旦数据存到cache中以后,以后再读取数据就不需要从源数据中重新读取或计算了,可以直接从源数据的拷贝cache中读取,也因此大大缩短了读取时间.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值