4 ms·
Just about every form of IPC is "slow". You have decided to pay a performance cost for safety.
by nitwit005 2y ago
Just about every form of IPC is "slow". You have decided to pay a performance cost for safety.
- marcosdumay 2y agoYou shouldn't have to pay that much. Pipes give you almost nothing, so they should cost almost nothing. Specifically, there aren't many reasons for your fastest IPC to be slower than a long function call.
- nitwit005 2y agoIf you don't think pipes offer much, don't use them. Saying "long function call" doesn't mean much since a function can take infinitely long.
- marcosdumay 2y agoA long distance function call, that invalidates everything on your cache.
- saagarjha 2y ago…which is quite expensive.
- marcosdumay 2y agoYes, it is. But it's much cheaper than interacting by pipe. Linux is optimizing sockets with a similar goal. And it's quite far on that direction. But there's still some margin to gain.
- brigade 2y agoPipes don’t exist for safety, they exist as an optimization to pass data between existing programs.
- PaulDavisThe1st 2y agoNOT writing and reading to and from a file stored on a drive is not, in this context, an optimization, but a significantly freeing conceptual shift that completely transforms how a class of users conducts themselves when using the computer.
- nitwit005 2y agoThe safety is memory protection. If you don't care about memory protection, you can reduce IPC to passing pointers around.