Serial speed vs performance

Was wondering if the serial speed (ie serial.begin(???)) has any impact on overall system load?

I have two Arduino boards talking back and forth on the serial interface and I want it to happen as fast as possible. Is there any reason that I should not run both at the max speed listed of 115200? The boards are within inches of each other.

TY Keshka

Well, it will have some impact on system load if you read/write characters as quickly as possible. At 115200bps, that means one character will be available to transmit or receive every 86.8 microseconds. Say it takes 10 microseconds to "handle" a character, this means you're spending 11.5% of your time dealing with the serial port.

At 38400 bps, one character is 260 microseconds, but it still only takes 10 microseconds to handle a character, so now you're spending 3.8% of your time dealing with the serial port.

Of course, if you only send out a character once in a while, and not continuously, then 115200bps vs. 38400bps doesn't matter much at all.

Thanks for the reply RC.
sorry I should have mentioned that my serial data will be in busts of up to 20 characters and I want to grab the data as fast as possible so as not to miss other events that will be happening. It is a situation similar to a robot. It is “doing things” while serial commands come.

Keshka

If you want to minimize the time spent sending data then you do want the highest speed. Serial.print will wait until all your characters are sent before returning execution back to your sketch.