what’s a Buffer?

In the context of computers buffer typically refers to computer memory that is used to temporarily store data while information is transitioning from one location to another. If the source of the data produces them at a lower rate than they are retrieved by the receiving process it will be more efficient to accumulate the data in a buffer and then have the recipient get them all at once.

Similar if the source of the data is faster than the recipient, it will be more efficient for the source to fill a buffer and work on something else while the recipient reads the data from the buffer.

For example, a computer processes data much faster than a person would enter them on a keyboard. Therefore it makes sense to store the input data in a buffer so that the processor doesn’t need to check for input so frequently, which would distract from all the other work a processor is engaged in