A question about arduino mega?

Serial communication is slow... Depending on our application, one solution would be to read/write serial data less frequently (not every time through main loop).

Computers deal with this problem by using a [u]buffer[/u]) (a small amount of separate-dedicated memory). The CPU reads & writes to the buffer at high speed. On the other side of the buffer, the data flows in & out at the communication speed. [u]Here's[/u] a buffered UART chip.

With the right hardware, the same thing can be done with a microcontroller (but I've never built anything like that.).

For example, without buffers audio/video would never work on a multitasking computer because the audio/video needs to flow at a nice smooth-constant rate, even when the CPU (and data bus) is interrupted or multitasking. (The operating system is always multitasking, even if you are only running one application.)