which one is faster Ethernet shield or serial port?

I am working on this project that involves a real time graphing and process. That requires the data to be sent from the sensors at high rates and now I am using the serial port to test the data. then I may need to move from serial port to Ethernet shield. I know the serial port reaches up to 115200 buadrate, does the Ethernet shield provide higher speed or lower?

I think ethernet is faster if used correctly.

thanks @SurferTim, I am interested in what "correctly" means to you ? : D

If you are looking for speed:

I like udp. Fast and simple. Low overhead.

You can't send one byte or a few bytes per packet. That is not correct. More protocol overhead than payload.

You can't open a tcp connection, send a few bytes, then close the connection over and over. That is not correct. Takes way too much time to open and close the connection.

Don't use a domain name for a server in client code. That is not correct. Takes too long to resolve.

I'm sure I'll think of more, but that will do for now.

Hardware serial will probably go up to 1,000,000 baud. And much faster than that if you are using a Leonardo and IDE 1.5.x +

…R

How far apart are these devices? If a couple feet or less, Robin2 has a point. If many feet, you would have a problem at that serial baud rate.

SurferTim: If a couple feet or less, Robin2 has a point.

I was assuming that communication would take place over the USB connection so it is that which would dictate the distance - not the choice of baud rate. The baud rate only arises within the Arduino board between the USB chip and the Atmega 328.

USB is well into the MHz range - far faster than 1MBaud. I have never had any problem with USB over about 5 metres - regular cable plus two extension cables. Admittedly I have not tried the Arduino that way - but I can't see why it would be different.

...R