Hacker News new | ask | show | jobs
by rchome 1603 days ago
I remember taking an operating systems class where the professor commented that Unix pipes added overhead because they create extra copies of the piped data. iirc, the kernel has to copy the data from the first process's memory into the kernel's memory and then copy it back into the second process's memory. I wonder what speedups we could see by bundling commonly used pipelines into a single process so the next task in the pipeline can directly read the input data from memory.

Of course, it's not The Unix Way to do this, but if it's the performance bottleneck in your application, maybe it's worth it.