Does using a pipe use any large amount of temporary storage "behind the scenes?"
Pipes have a buffer, but the memory used by it shouldn't be a concern.
Are pipes purely synchronous?
When the pipe's buffer is full, the writer will block until the reader makes room in the buffer.
Similarly, if the reader is faster than the writter, it will block when trying to read from an empty pipe.
So access is normally asynchronous, but it can degenerate into being synchronous.
How fast is a pipe compared to a temporary file?
Should be similar. I would guess that using a pipe would be be faster since it's simpler and doesn't use the disk.
Does using a pipe affect the buffering that Perl does?
No. Perl does the same IO buffering for pipes as it would do for files.
Your other program should also do the same IO buffering for pipes as it would do for files, no matter what language is used.
|