Hacker News new | ask | show | jobs
by parhamn 731 days ago
A named pipe (fifo) would be an interest to test too. I believe theyre a good bit faster than a unix socket.
3 comments

My recollection from Advanced Programming in the Unix Environment is that unix sockets are actually often faster than named pipes:

You got me curious; according to a quick search, that seems to hold up according to this more recent post (which doesn't note the OS, annoyingly):

https://www.yanxurui.cc/posts/server/2023-11-28-benchmark-tc...

I'd be interested in more robust data here.

IIRC for most packets, UDS are actually faster (not by a massive amount) than named pipes: https://stackoverflow.com/questions/1235958/ipc-performance-... and this advantage increases with packet size (from my own testing).
TIL! Thanks for the link.
Have only seen the other way but shmem with a spinloop should be faster.