Opening a socket is typically as fast or
faster than opening a pipe.
Pipe issues:
Have the overhead of starting a separate process. (you
may or may not have this overhead when doing a TCP socket
connection depending on if the server
is forking or threading)
socket/TCP port issues:
Most OSes have highly optimized TCP/IP stacks,
generally much more optmized than the OSes core pipe
processing functions. For today's applications network
performance is typically much more important than pipe performance.
localhost TCP/IP connections (where client and server
are on the same host) do not go out "on the wire", they
are typically highly optimized
with direct memory-to-memory exchange of the data.
Localhost network connections have practially
0 network overhead.